mirror of
https://github.com/fscotto/infra.git
synced 2026-07-29 16:20:01 +00:00
Elimina completamente la sessione desktop i3 (X11), ormai non più usata (gli host espongono solo sway e Hyprland su Wayland): - ruolo profile_desktop_i3 e voce emptty i3.desktop - desktop_i3_packages e i guard 'i3' in desktop_sessions_enabled - desktop_i3_dotfiles e host_i3_dotfiles (autorandr X11) - dotfiles i3/X11: .xinitrc, i3, i3blocks, picom, polybar, autorandr - task host-specifici i3 (copy dotfiles, wrap prime-run su nymph) - rimuove st (terminale X11 da sorgente) da desktop_void_source_tools - consolida lo script live in scripts/remove_i3.sh, elimina cleanup-i3.sh - aggiorna la documentazione (README/AGENTS/CLAUDE/knowledge) Config Emacs lasciata invariata di proposito. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
56 lines
1.8 KiB
YAML
56 lines
1.8 KiB
YAML
---
|
|
- name: Check if GRUB_CMDLINE_LINUX line exists in /etc/default/grub
|
|
tags: [packages, nvidia]
|
|
ansible.builtin.command:
|
|
cmd: grep -E '^GRUB_CMDLINE_LINUX=' /etc/default/grub
|
|
register: nymph_grub_cmdline_check
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: Initialize empty GRUB_CMDLINE_LINUX line if missing
|
|
tags: [packages, nvidia]
|
|
ansible.builtin.lineinfile:
|
|
path: /etc/default/grub
|
|
line: 'GRUB_CMDLINE_LINUX=""'
|
|
insertafter: '^GRUB_CMDLINE_LINUX_DEFAULT='
|
|
state: present
|
|
when: nymph_grub_cmdline_check.rc != 0
|
|
register: nymph_grub_cmdline_init
|
|
|
|
- name: Append NVIDIA kernel parameters to GRUB_CMDLINE_LINUX if missing
|
|
tags: [packages, nvidia]
|
|
ansible.builtin.replace:
|
|
path: /etc/default/grub
|
|
regexp: '^(GRUB_CMDLINE_LINUX="(?:(?!{{ item | regex_escape }})[^"])*?)"$'
|
|
replace: '\1 {{ item }}"'
|
|
loop:
|
|
- nouveau.modeset=0
|
|
- nvidia-drm.modeset=1
|
|
register: nymph_grub_cmdline_append
|
|
|
|
- name: Regenerate GRUB configuration
|
|
tags: [packages, nvidia]
|
|
ansible.builtin.command: grub-mkconfig -o /boot/grub/grub.cfg
|
|
changed_when: true
|
|
when: nymph_grub_cmdline_init is changed or nymph_grub_cmdline_append is changed
|
|
|
|
- name: Configure NVIDIA power management for hybrid graphics
|
|
tags: [packages, nvidia]
|
|
ansible.builtin.copy:
|
|
dest: /etc/modprobe.d/nvidia-power-management.conf
|
|
content: |
|
|
options nvidia "NVreg_DynamicPowerManagement=0x02"
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
|
|
- name: Install prime-run wrapper script for NVIDIA PRIME offload
|
|
tags: [nvidia, dotfiles, dotfiles:host]
|
|
ansible.builtin.copy:
|
|
src: "{{ playbook_dir }}/../dotfiles/nymph/.local/bin/prime-run"
|
|
dest: "{{ user_home }}/.local/bin/prime-run"
|
|
owner: "{{ username }}"
|
|
group: "{{ user_group }}"
|
|
mode: "0755"
|
|
force: false
|