feat: complete wayland desktop deployment (gnome/kde/sway/hyprland)
This commit is contained in:
@@ -140,7 +140,7 @@
|
||||
os in ["ubuntu", "ubuntu-lts"]
|
||||
and (os_version | default('') | string | length) == 0
|
||||
) or (
|
||||
os in ["alpine", "archlinux", "opensuse", "void"]
|
||||
os == "archlinux"
|
||||
)
|
||||
fail_msg: "Invalid os/version specified. Please check README.md for supported values."
|
||||
quiet: true
|
||||
@@ -252,6 +252,49 @@
|
||||
peripherals.webcam in [auto|true|false]; hardware.profile must be a dict.
|
||||
quiet: true
|
||||
|
||||
- name: Validate desktop environment
|
||||
when: system_cfg.features.desktop.enabled | bool
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- system_cfg.features.desktop.environment in ["gnome", "kde", "sway", "hyprland"]
|
||||
- >-
|
||||
system_cfg.features.desktop.environment not in ["sway", "hyprland"]
|
||||
or os_family_map[os] | default('') == "Archlinux"
|
||||
- >-
|
||||
system_cfg.features.desktop.display_manager | default('') | length == 0
|
||||
or system_cfg.features.desktop.display_manager in ["gdm", "sddm", "greetd"]
|
||||
- >-
|
||||
system_cfg.features.desktop.display_manager | default('') != "greetd"
|
||||
or system_cfg.features.desktop.environment in ["sway", "hyprland"]
|
||||
- >-
|
||||
system_cfg.features.desktop.environment != "gnome"
|
||||
or system_cfg.features.desktop.display_manager | default('') in ["", "gdm"]
|
||||
- >-
|
||||
system_cfg.features.desktop.environment != "kde"
|
||||
or system_cfg.features.desktop.display_manager | default('') in ["", "sddm"]
|
||||
fail_msg: >-
|
||||
Invalid desktop config: environment '{{ system_cfg.features.desktop.environment }}'
|
||||
for os_family '{{ os_family_map[os] | default('Unknown') }}',
|
||||
display_manager '{{ system_cfg.features.desktop.display_manager | default('') }}'.
|
||||
gnome and kde are available on all families; sway and hyprland are Archlinux only.
|
||||
display_manager must be empty (auto) or match the environment's native DM:
|
||||
gnome->gdm, kde->sddm, sway/hyprland->greetd. Only that DM's package is
|
||||
installed, so a mismatched override fails at enable time.
|
||||
quiet: true
|
||||
|
||||
- name: Validate desktop autologin
|
||||
when: system_cfg.features.desktop.enabled | bool
|
||||
vars:
|
||||
_autologin: "{{ system_cfg.features.desktop.autologin | default(false) }}"
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- _autologin is boolean and not _autologin or (_autologin is string and _autologin | length > 0 and _autologin in system_cfg.users)
|
||||
fail_msg: >-
|
||||
desktop.autologin must be false or a username string present in
|
||||
system.users; got '{{ _autologin }}'. Bool true is not accepted - the
|
||||
resolver matches the value against system.users by name.
|
||||
quiet: true
|
||||
|
||||
- name: Validate virtual system sizing
|
||||
when: system_cfg.type == "virtual"
|
||||
ansible.builtin.assert:
|
||||
@@ -262,7 +305,7 @@
|
||||
- (system_cfg.disks[0].size | float) > 0
|
||||
- (system_cfg.disks[0].size | float) >= 20
|
||||
# Btrfs minimum disk: swap_size + 5.5 GiB overhead (subvolumes + metadata).
|
||||
# Swap sizing: memory < 16 GiB → max(memory_GiB, 2); memory >= 16 GiB → memory/2.
|
||||
# Swap sizing: memory < 16 GiB -> max(memory_GiB, 2); memory >= 16 GiB -> memory/2.
|
||||
- >-
|
||||
system_cfg.filesystem != "btrfs"
|
||||
or (
|
||||
|
||||
Reference in New Issue
Block a user