feat: implement hyprland role and package configuration
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
- name: rebuild initramfs
|
||||||
|
command: mkinitcpio -P
|
||||||
|
become: yes
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
---
|
||||||
|
- name: Hyprland - install packages
|
||||||
|
community.general.pacman:
|
||||||
|
name: "{{ hyprland_packages }}"
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
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
|
||||||
|
- wofi
|
||||||
|
- dunst
|
||||||
|
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 - register session in SDDM
|
||||||
|
copy:
|
||||||
|
dest: /usr/share/wayland-sessions/hyprland.desktop
|
||||||
|
content: |
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Hyprland
|
||||||
|
Comment=An intelligent dynamic tiling Wayland compositor
|
||||||
|
Exec=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: 'waybar_config.j2', dest: 'waybar/config' }
|
||||||
|
- { src: 'waybar_style.css.j2', dest: 'waybar/style.css' }
|
||||||
|
- { src: 'dunstrc.j2', dest: 'dunst/dunstrc' }
|
||||||
|
tags: [hyprland, config]
|
||||||
@@ -9,3 +9,59 @@ os_type: archlinux
|
|||||||
pnpm_version: "25.6.1"
|
pnpm_version: "25.6.1"
|
||||||
python_version: "3.14.3"
|
python_version: "3.14.3"
|
||||||
php_version: "8.5.3"
|
php_version: "8.5.3"
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# system-upgrade role: kernel + NVIDIA preparation for Hyprland/Wayland
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Strategy: keep linux618 as fallback, add linux70 (7.0.x stable)
|
||||||
|
# as the new daily-driver kernel. Migrate NVIDIA from the pinned 575xx branch
|
||||||
|
# to the 580xx branch (NFB) for Pascal compatibility.
|
||||||
|
# See: docs/adr/0002-kernel-and-nvidia-strategy.md
|
||||||
|
kernel_packages:
|
||||||
|
- linux618
|
||||||
|
- linux618-headers
|
||||||
|
- linux70
|
||||||
|
- linux70-headers
|
||||||
|
nvidia_kernel_modules:
|
||||||
|
- linux618-nvidia-580xx
|
||||||
|
- linux70-nvidia-580xx
|
||||||
|
nvidia_userspace_packages:
|
||||||
|
- nvidia-580xx-utils
|
||||||
|
- lib32-nvidia-580xx-utils
|
||||||
|
- opencl-nvidia-580xx
|
||||||
|
- nvidia-580xx-settings
|
||||||
|
nvidia_packages_to_remove:
|
||||||
|
- linux612-nvidia-575xx
|
||||||
|
- nvidia-575xx-utils
|
||||||
|
- lib32-nvidia-575xx-utils
|
||||||
|
- nvidia-575xx-settings
|
||||||
|
- opencl-nvidia
|
||||||
|
# Pre-flight: refuse to proceed if free space on / drops below this many GiB.
|
||||||
|
# Current usage is ~87% so we keep this conservative.
|
||||||
|
min_free_root_gb: 5
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# hyprland role: packages and configuration
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
hyprland_packages:
|
||||||
|
- hyprland
|
||||||
|
- hyprlock
|
||||||
|
- hypridle
|
||||||
|
- hyprshot
|
||||||
|
- hyprcursor
|
||||||
|
- xdg-desktop-portal-hyprland
|
||||||
|
- waybar
|
||||||
|
- wofi
|
||||||
|
- dunst
|
||||||
|
- kitty
|
||||||
|
- cliphist
|
||||||
|
- wl-clipboard
|
||||||
|
- brightnessctl
|
||||||
|
- pipewire
|
||||||
|
- pipewire-pulse
|
||||||
|
- wireplumber
|
||||||
|
- pavucontrol
|
||||||
|
- dolphin
|
||||||
|
- egl-wayland
|
||||||
|
- qt5-wayland
|
||||||
|
- qt6-wayland
|
||||||
|
|||||||
@@ -8,6 +8,11 @@
|
|||||||
- vars/secrets.yml
|
- vars/secrets.yml
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
|
- role: system-upgrade
|
||||||
|
tags: [system-upgrade]
|
||||||
|
when: os_type == 'archlinux'
|
||||||
- common
|
- common
|
||||||
- dev-tools
|
- dev-tools
|
||||||
- maintenance
|
- maintenance
|
||||||
|
- role: hyprland
|
||||||
|
tags: [hyprland]
|
||||||
|
|||||||
Reference in New Issue
Block a user