Files
mw-pfeddersheim-workstation/ansible/roles/hyprland/tasks/main.yml
T
ja b0af3dcf12 Workstation optimization: Chrome cleanup, package purge, PCIe audit, service tuning
- Chrome/Chromium cleanup (ADR 0006): removed 10GB chromium profile, broken PWA
  shortcuts, dead BROWSER_CDP_URL from .bashrc, restored Wayland chrome-flags.conf
- Package cleanup (ADR 0007): Tier 1-4 executed, 40 packages removed (KDE Plasma,
  ruby, love, xorg-server, kscreen/kscreenlocker), 45 cascade orphans purged
- Waybar USB module: auto-mount via udisks2, yazi integration, hover details
- Service tuning: disabled bluetooth.service, NetworkManager-wait-online.service
- hypridle fix: upgraded sdbus-cpp 2.3.0->2.3.1-1 (SEGV crash loop resolved)
- PCIe audit: GPU in wrong slot (PCIEX4 vs PCIEX16), 8x bandwidth loss documented
- D-Bus cleanup: removed stale org.kde.kwalletd6.service stub
- Ansible: all changes reflected in vars/main.yml and task files
2026-05-22 16:24:18 +02:00

118 lines
3.7 KiB
YAML

---
- name: Hyprland - install packages
community.general.pacman:
name: "{{ hyprland_packages }}"
state: present
update_cache: yes
tags: [hyprland, packages]
- name: Hyprland - remove X11 packages (Wayland-only)
community.general.pacman:
name: "{{ hyprland_packages_remove }}"
state: absent
tags: [hyprland, packages]
- name: Hyprland - ensure configuration directories exist
file:
path: "/home/{{ system_user }}/.config/{{ item }}"
state: directory
owner: "{{ system_user }}"
group: "{{ system_user }}"
mode: '0755'
loop:
- hypr
- waybar
- hyprlauncher
- dunst
tags: [hyprland, config]
- name: Hyprland - ensure Waybar scripts directory exists
file:
path: "/home/{{ system_user }}/.config/waybar/scripts"
state: directory
owner: "{{ system_user }}"
group: "{{ system_user }}"
mode: '0755'
tags: [hyprland, config]
- name: Hyprland - configure NVIDIA DRM KMS (modeset=1)
lineinfile:
path: /etc/modprobe.d/nvidia.conf
line: "options nvidia-drm modeset=1"
create: yes
notify: rebuild initramfs
tags: [hyprland, nvidia]
- name: Hyprland - check if NVIDIA modules are already in mkinitcpio
command: grep -q "nvidia nvidia_modeset nvidia_uvm nvidia_drm" /etc/mkinitcpio.conf
register: mkinitcpio_check
failed_when: false
changed_when: false
tags: [hyprland, nvidia]
- name: Hyprland - configure early module loading in mkinitcpio
replace:
path: /etc/mkinitcpio.conf
regexp: '^MODULES=\((.*)\)'
replace: 'MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm \1)'
when: mkinitcpio_check.rc != 0
notify: rebuild initramfs
tags: [hyprland, nvidia]
- name: Hyprland - override Wayland session desktop entry (local user)
# Overrides /usr/share/wayland-sessions/hyprland.desktop with start-hyprland
# as the Exec target. This ensures Hyprland is launched through the watchdog
# binary (start-hyprland) for proper crash diagnostics and signal handling.
# XDG_DATA_DIRS priority: ~/.local/share > /usr/share.
# See: docs/adr/0004-start-hyprland-override.md
copy:
dest: /home/{{ system_user }}/.local/share/wayland-sessions/hyprland.desktop
owner: "{{ system_user }}"
group: "{{ system_user }}"
mode: '0644'
content: |
[Desktop Entry]
Name=Hyprland
Comment=An intelligent dynamic tiling Wayland compositor
Exec=start-hyprland
TryExec=start-hyprland
Type=Application
DesktopNames=Hyprland
tags: [hyprland, session]
- name: Hyprland - template core configuration
template:
src: "{{ item.src }}"
dest: "/home/{{ system_user }}/.config/{{ item.dest }}"
owner: "{{ system_user }}"
group: "{{ system_user }}"
mode: '0644'
loop:
- { src: 'hyprland.conf.j2', dest: 'hypr/hyprland.conf' }
- { src: 'hyprlock.conf.j2', dest: 'hypr/hyprlock.conf' }
- { src: 'hypridle.conf.j2', dest: 'hypr/hypridle.conf' }
- { src: 'hyprpaper.conf.j2', dest: 'hypr/hyprpaper.conf' }
- { src: 'waybar_config.j2', dest: 'waybar/config' }
- { src: 'waybar_style.css.j2', dest: 'waybar/style.css' }
- { src: 'hyprlauncher.conf.j2', dest: 'hypr/hyprlauncher.conf' }
- { src: 'dunstrc.j2', dest: 'dunst/dunstrc' }
tags: [hyprland, config]
- name: Hyprland - deploy Waybar GPU monitoring script
template:
src: 'waybar_gpu_script.sh.j2'
dest: "/home/{{ system_user }}/.config/waybar/scripts/gpu.sh"
owner: "{{ system_user }}"
group: "{{ system_user }}"
mode: '0755'
tags: [hyprland, config]
- name: Hyprland - deploy Waybar USB automount script
template:
src: 'waybar_usb_script.sh.j2'
dest: "/home/{{ system_user }}/.config/waybar/scripts/usb.sh"
owner: "{{ system_user }}"
group: "{{ system_user }}"
mode: '0755'
tags: [hyprland, config]