feat: complete wayland desktop deployment (gnome/kde/sway/hyprland)
This commit is contained in:
@@ -8,14 +8,37 @@
|
||||
_de: "{{ system_cfg.features.desktop.environment }}"
|
||||
_family_pkgs: "{{ bootstrap_desktop_packages[os_family] | default({}) }}"
|
||||
_de_config: "{{ _family_pkgs[_de] | default({}) }}"
|
||||
_base: "{{ bootstrap_desktop_base_packages[os_family] | default([]) }}"
|
||||
_requested_groups: "{{ system_cfg.features.desktop.groups | default([]) }}"
|
||||
_group_pkgs: >-
|
||||
{{
|
||||
_requested_groups
|
||||
| select('in', desktop_package_groups)
|
||||
| map('extract', desktop_package_groups)
|
||||
| map(attribute=os_family, default=[])
|
||||
| list
|
||||
| sum(start=[])
|
||||
}}
|
||||
ansible.builtin.set_fact:
|
||||
_desktop_groups: "{{ _de_config.groups | default([]) }}"
|
||||
_desktop_packages: "{{ _de_config.packages | default([]) }}"
|
||||
# GNOME ships under different dnf environment groups: Fedora uses
|
||||
# workstation-product-environment, enterprise RHEL/Rocky/Alma use
|
||||
# graphical-server-environment ("Server with GUI").
|
||||
_desktop_groups: >-
|
||||
{{ ['graphical-server-environment']
|
||||
if (_de == 'gnome' and os_family == 'RedHat' and os != 'fedora')
|
||||
else (_de_config.groups | default([])) }}
|
||||
_desktop_packages: >-
|
||||
{{
|
||||
((_de_config.packages | default([])) + _base + _group_pkgs)
|
||||
| reject('equalto', '')
|
||||
| unique
|
||||
| list
|
||||
}}
|
||||
|
||||
- name: Validate desktop environment is supported
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- (_desktop_groups | length > 0) or (_desktop_packages | length > 0)
|
||||
- system_cfg.features.desktop.environment in (bootstrap_desktop_packages[os_family] | default({}))
|
||||
fail_msg: >-
|
||||
Desktop environment '{{ system_cfg.features.desktop.environment }}'
|
||||
is not defined for os_family '{{ os_family }}'.
|
||||
@@ -25,7 +48,7 @@
|
||||
- name: Install desktop package groups
|
||||
when: _desktop_groups | length > 0
|
||||
ansible.builtin.command: >-
|
||||
{{ chroot_command }} dnf --releasever={{ os_version }}
|
||||
{{ chroot_command }} dnf --releasever={{ os_version_major }}
|
||||
--setopt=install_weak_deps=False group install -y {{ _desktop_groups | join(' ') }}
|
||||
register: _desktop_group_result
|
||||
changed_when: _desktop_group_result.rc == 0
|
||||
@@ -35,14 +58,12 @@
|
||||
vars:
|
||||
_install_commands:
|
||||
RedHat: >-
|
||||
{{ chroot_command }} dnf --releasever={{ os_version }}
|
||||
{{ chroot_command }} dnf --releasever={{ os_version_major }}
|
||||
--setopt=install_weak_deps=False install -y {{ _desktop_packages | join(' ') }}
|
||||
Debian: >-
|
||||
{{ chroot_command }} apt install -y {{ _desktop_packages | join(' ') }}
|
||||
{{ chroot_command }} apt install -y --install-recommends {{ _desktop_packages | join(' ') }}
|
||||
Archlinux: >-
|
||||
pacstrap /mnt {{ _desktop_packages | join(' ') }}
|
||||
Suse: >-
|
||||
{{ chroot_command }} zypper install -y {{ _desktop_packages | join(' ') }}
|
||||
ansible.builtin.command: "{{ _install_commands[os_family] }}"
|
||||
register: _desktop_pkg_result
|
||||
changed_when: _desktop_pkg_result.rc == 0
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
---
|
||||
# Per-family desktop environment package definitions.
|
||||
# Keyed by os_family -> environment -> groups (dnf groupinstall) / packages.
|
||||
# Kept intentionally minimal: base DE + essential tools, no full suites.
|
||||
# Keyed by os_family -> environment -> groups (dnf group install) / packages.
|
||||
# Wayland only: gnome, kde, sway, hyprland. No X11/xorg-server, no X11-only DEs.
|
||||
# DE sets carry the session bits + the DE-specific xdg portal backend; the
|
||||
# shared base below (fonts/audio/portal core/power/viewer apps) is layered on
|
||||
# top for every DE via bootstrap_desktop_base_packages.
|
||||
bootstrap_desktop_packages:
|
||||
RedHat:
|
||||
gnome:
|
||||
@@ -24,13 +27,6 @@ bootstrap_desktop_packages:
|
||||
- xdg-user-dirs
|
||||
- xdg-desktop-portal-kde
|
||||
- bluez
|
||||
- pipewire
|
||||
- wireplumber
|
||||
xfce:
|
||||
groups:
|
||||
- xfce-desktop-environment
|
||||
packages:
|
||||
- lightdm
|
||||
Debian:
|
||||
gnome:
|
||||
groups: []
|
||||
@@ -53,15 +49,6 @@ bootstrap_desktop_packages:
|
||||
- xdg-user-dirs
|
||||
- xdg-desktop-portal-kde
|
||||
- bluez
|
||||
- pipewire
|
||||
- wireplumber
|
||||
xfce:
|
||||
groups: []
|
||||
packages:
|
||||
- xfce4
|
||||
- xfce4-goodies
|
||||
- lightdm
|
||||
- xdg-user-dirs
|
||||
Archlinux:
|
||||
gnome:
|
||||
groups: []
|
||||
@@ -84,15 +71,6 @@ bootstrap_desktop_packages:
|
||||
- xdg-user-dirs
|
||||
- xdg-desktop-portal-kde
|
||||
- bluez
|
||||
- pipewire
|
||||
- wireplumber
|
||||
xfce:
|
||||
groups: []
|
||||
packages:
|
||||
- xfce4
|
||||
- xfce4-goodies
|
||||
- lightdm
|
||||
- xdg-user-dirs
|
||||
sway:
|
||||
groups: []
|
||||
packages:
|
||||
@@ -100,12 +78,13 @@ bootstrap_desktop_packages:
|
||||
- waybar
|
||||
- foot
|
||||
- wofi
|
||||
- nautilus
|
||||
- greetd
|
||||
- greetd-tuigreet
|
||||
- xdg-user-dirs
|
||||
- xdg-desktop-portal-wlr
|
||||
- polkit-gnome
|
||||
- bluez
|
||||
- pipewire
|
||||
- wireplumber
|
||||
hyprland:
|
||||
groups: []
|
||||
packages:
|
||||
@@ -113,37 +92,80 @@ bootstrap_desktop_packages:
|
||||
- kitty
|
||||
- wofi
|
||||
- waybar
|
||||
- ly
|
||||
- nautilus
|
||||
- greetd
|
||||
- greetd-tuigreet
|
||||
- xdg-user-dirs
|
||||
- xdg-desktop-portal-hyprland
|
||||
- polkit-kde-agent
|
||||
- qt5-wayland
|
||||
- qt6-wayland
|
||||
- bluez
|
||||
- pipewire
|
||||
- wireplumber
|
||||
Suse:
|
||||
gnome:
|
||||
groups: []
|
||||
packages:
|
||||
- patterns-gnome-gnome_basic
|
||||
- gdm
|
||||
- xdg-user-dirs
|
||||
kde:
|
||||
groups: []
|
||||
packages:
|
||||
- patterns-kde-kde_plasma
|
||||
- sddm
|
||||
- xdg-user-dirs
|
||||
|
||||
# Display manager auto-detection from desktop environment.
|
||||
bootstrap_desktop_dm_map:
|
||||
gnome: gdm
|
||||
kde: sddm
|
||||
xfce: lightdm
|
||||
sway: greetd
|
||||
hyprland: ly@tty2
|
||||
cinnamon: lightdm
|
||||
mate: lightdm
|
||||
lxqt: sddm
|
||||
budgie: gdm
|
||||
# Shared desktop base, installed for EVERY DE whenever desktop.enabled.
|
||||
# Fonts (noto + emoji + one nerd font), audio stack (pipewire + wireplumber +
|
||||
# pipewire-pulse), xdg portal core, power-profiles-daemon, and viewer-only base
|
||||
# apps (browser, PDF/image/video viewers). DE metas (gnome/plasma) bundle their
|
||||
# own file manager + settings, so no file manager is added here - the wlroots
|
||||
# DE sets above carry their own (nautilus).
|
||||
bootstrap_desktop_base_packages:
|
||||
RedHat:
|
||||
- google-noto-sans-fonts
|
||||
- google-noto-emoji-fonts
|
||||
- fira-code-fonts
|
||||
- pipewire
|
||||
- wireplumber
|
||||
- pipewire-pulseaudio
|
||||
- xdg-desktop-portal
|
||||
- power-profiles-daemon
|
||||
- firefox
|
||||
- evince
|
||||
- eog
|
||||
- mpv
|
||||
Debian:
|
||||
- fonts-noto
|
||||
- fonts-noto-color-emoji
|
||||
- fonts-firacode
|
||||
- pipewire
|
||||
- wireplumber
|
||||
- pipewire-pulse
|
||||
- xdg-desktop-portal
|
||||
- power-profiles-daemon
|
||||
- firefox-esr
|
||||
- evince
|
||||
- eog
|
||||
- mpv
|
||||
Archlinux:
|
||||
- noto-fonts
|
||||
- noto-fonts-emoji
|
||||
- ttf-nerd-fonts-symbols
|
||||
- pipewire
|
||||
- wireplumber
|
||||
- pipewire-pulse
|
||||
- xdg-desktop-portal
|
||||
- power-profiles-daemon
|
||||
- firefox
|
||||
- evince
|
||||
- loupe
|
||||
- mpv
|
||||
|
||||
# Opt-in package groups, selected per host via features.desktop.groups (a list
|
||||
# of group names). _desktop.yml installs the union of the requested groups'
|
||||
# packages. Empty selection by default.
|
||||
desktop_package_groups:
|
||||
dev:
|
||||
RedHat:
|
||||
- git
|
||||
- "@development-tools"
|
||||
- neovim
|
||||
- python3-pip
|
||||
Debian:
|
||||
- git
|
||||
- build-essential
|
||||
- neovim
|
||||
- python3-pip
|
||||
Archlinux:
|
||||
- git
|
||||
- base-devel
|
||||
- neovim
|
||||
- python-pip
|
||||
|
||||
Reference in New Issue
Block a user