diff --git a/AGENTS.md b/AGENTS.md index 59f2fc3..c05ac8e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # AGENTS.md -Ansible-driven personal infrastructure repo for Void desktops, Linux Mint and FreeBSD transition targets, Linux workstations, WSL, and an Ubuntu server. +Ansible-driven personal infrastructure repo for Fedora and Void desktops, Linux Mint and FreeBSD transition targets, Linux workstations, WSL, and an Ubuntu server. ## Source Of Truth - Main orchestration: `ansible/site.yml` @@ -12,7 +12,7 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux Mint and Fr ## Topology - Current personal desktop: `ikaros = platform_mint + role_personal_workstation + desktop_cinnamon` -- Current laptop/lab: `nymph = platform_void + role_lab + desktop_niri` +- Current laptop: `nymph = platform_fedora + graphical_desktop + desktop_gnome` - Void desktop profile is also the base for other future/reference hosts via `platform_void + graphical_desktop` - Native Linux workstation: `deadalus-fedora` - WSL dev: `deadalus-wsl` @@ -38,7 +38,7 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux Mint and Fr - `yamllint ansible/` - Host-focused dry runs: - Mint desktop work: `ansible-playbook ansible/site.yml --limit ikaros --check --diff` - - Void laptop work: `ansible-playbook ansible/site.yml --limit nymph --check --diff` + - Fedora laptop work: `ansible-playbook ansible/site.yml --limit nymph --check --diff` - Fedora workstation: `ansible-playbook ansible/site.yml --limit deadalus-fedora --check --diff` - WSL dev: `ansible-playbook ansible/site.yml --limit deadalus-wsl --check --diff` - Server: `ansible-playbook ansible/site.yml --limit prometheus --check --diff` @@ -56,8 +56,8 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux Mint and Fr - Use `no_log: true` for secret-bearing task inputs or outputs. ## Desktop Notes -- `desktop_profile` names independently selectable desktop groups such as `desktop_hyprland`, `desktop_sway`, `desktop_niri`, and `desktop_cinnamon`. Keep platform-specific session bootstrap in platform-specific roles. -- `desktop_environment` selects the mutually exclusive `minimal` (default), `xfce`, or `kde` desktop mode. `profile_desktop_common` owns shared bootstrap; the minimal mode uses `profile_desktop_sway`, `profile_desktop_hyprland`, and `profile_desktop_niri`, `profile_desktop_xfce` owns the reproducible XFCE setup, and `profile_desktop_kde` owns KDE-specific defaults and cleanup. `desktop_sessions_enabled` and `desktop_default_session` apply only to the minimal mode. +- `desktop_profile` names independently selectable desktop groups such as `desktop_gnome`, `desktop_hyprland`, `desktop_sway`, `desktop_niri`, and `desktop_cinnamon`. Keep platform-specific session bootstrap in platform-specific roles. +- `desktop_environment` selects the mutually exclusive `minimal` (default), `gnome`, `xfce`, or `kde` desktop mode. `profile_desktop_common` owns shared bootstrap; the minimal mode uses `profile_desktop_sway`, `profile_desktop_hyprland`, and `profile_desktop_niri`, `profile_desktop_xfce` owns the reproducible XFCE setup, and `profile_desktop_kde` owns KDE-specific defaults and cleanup. `desktop_sessions_enabled` and `desktop_default_session` apply only to the minimal mode. - Emacs packages and `.emacs.d` deploy are disabled by default via `emacs_enabled: false`; keep the dotfiles in the repo for reversible opt-in only. - NTFS filesystem support is provided by `ntfs-3g` in `ansible/inventory/group_vars/void.yml`. - Void user services are managed by `turnstile` and live under `dotfiles/desktop/.config/service/`. @@ -66,10 +66,11 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux Mint and Fr - `dotfiles/desktop/.config/sway/config` plus `host.conf` and `session-env` deployed via `host_sway_dotfiles` (sway / Wayland) - `dotfiles/desktop/.config/hypr/hyprland.conf` plus `host.conf` and `session-env` deployed via `host_hyprland_dotfiles` (Hyprland / Wayland) - `dotfiles/desktop/.config/niri/config.kdl` and `session-env` deployed via `desktop_niri_dotfiles` (Niri / Wayland) -- Void Niri (the `nymph` target) lives in `profile_desktop_niri`, gated on `'niri' in desktop_sessions_enabled`; it installs the `emptty` `niri.desktop` session, the `/usr/local/bin/start-niri` launcher, and the xdg-desktop-portal config, mirroring `profile_desktop_sway`. +- Void Niri lives in `profile_desktop_niri`, gated on `'niri' in desktop_sessions_enabled`; it installs the `emptty` `niri.desktop` session, the `/usr/local/bin/start-niri` launcher, and the xdg-desktop-portal config, mirroring `profile_desktop_sway`. +- Fedora GNOME (`desktop_gnome`) currently assumes GNOME comes from the Fedora Workstation base install; Ansible does not customize GNOME for `nymph` yet. - FreeBSD Niri (dormant; `platform_freebsd` currently has no hosts) must keep FreeBSD-specific package, rc, DBus, seat, portal, and launcher behavior in `profile_desktop_niri_freebsd` or FreeBSD platform vars. - Do not switch or restart a display manager during a playbook run from an active graphical session. Changing among `emptty`, LightDM, and SDDM requires an explicit run from another TTY/SSH session with `desktop_allow_display_manager_switch=true`. Apply managed XFCE XML while logged out of XFCE so `xfconfd` cannot overwrite it from its in-memory state. -- `nymph` is the Void/Niri laptop target; prefer minimal scrollable-tiling defaults first, then host-specific tuning after real use. +- `nymph` is the Fedora/GNOME laptop target; keep GNOME unmanaged for now and add host-specific tuning only after real use. ## Void Package And Dotfile Bucket Rules `platform_void` is the reusable Void platform selection. The legacy `void` group remains a compatibility parent so existing `group_vars/void.yml` and `when: "'void' in group_names"` checks keep working during the transition. diff --git a/README.md b/README.md index b6e30cc..4aafb00 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Matrice target: | Host | Platform | Role | Desktop | | -------------- | ---------- | -------------------- | --------------------------------- | | ikaros | Linux Mint | Personal workstation | Cinnamon | -| nymph | Void Linux | Lab | Niri | +| nymph | Fedora | Desktop laptop | GNOME | | void-reference | Void Linux | Lab/reference | Current preserved desktop profile | Regola operativa: @@ -82,9 +82,9 @@ nymph is allowed to break ``` `ikaros` usa il target stabile Linux Mint/Cinnamon; `nymph` usa il target -Void/Niri per il workflow laptop scrollable-tiling. I gruppi legacy `void` e -`desktop` restano alias di compatibilita per eventuali host Void futuri mentre i -nuovi assi sono `platform_*`, `role_*` e `desktop_*`. +Fedora Workstation/GNOME. I gruppi legacy `void` e `desktop` restano alias di +compatibilita per eventuali host Void futuri mentre i nuovi assi sono +`platform_*`, `role_*` e `desktop_*`. Prima di una migrazione reale degli host e consigliato creare uno snapshot logico, per esempio: @@ -106,12 +106,12 @@ Nota sullo stato attuale del playbook principale: Target operativi: - `ikaros`: Linux Mint + Cinnamon, desktop personale stabile/floating. -- `nymph`: Void Linux + Niri, laptop scrollable-tiling per sfruttare meglio lo schermo piccolo. +- `nymph`: Fedora Workstation + GNOME, laptop desktop con GNOME non personalizzato da Ansible per ora. Il profilo Void desktop resta disponibile come modello riutilizzabile per host futuri. `desktop_environment` continua a selezionare in modo esclusivo -`minimal`, `xfce` oppure `kde` per i desktop Void; Niri e Cinnamon sono profili -desktop indipendenti via gruppi `desktop_niri` e `desktop_cinnamon`. +`minimal`, `xfce` oppure `kde` per i desktop Void; Niri, GNOME e Cinnamon sono profili +desktop indipendenti via gruppi `desktop_niri`, `desktop_gnome` e `desktop_cinnamon`. Lo stato attuale del profilo desktop include, tra le altre cose: @@ -252,7 +252,7 @@ Esempi correnti: ```text ikaros -> common + platform_mint + role_personal_workstation + desktop_cinnamon + ikaros -nymph -> common + platform_void + role_lab + desktop_niri + nymph +nymph -> common + platform_fedora + graphical_desktop + desktop_gnome + nymph ``` Questo approccio consente di: @@ -311,7 +311,8 @@ platform_mint & desktop_cinnamon -> profile_desktop_cinnamon platform_freebsd -> packages_freebsd + services_freebsd platform_freebsd & role_lab -> profile_lab platform_freebsd & desktop_niri -> profile_desktop_niri_freebsd -workstation_dev_fedora -> packages_fedora + services_systemd + profile_workstation_dev_common +platform_fedora -> packages_fedora + services_systemd +workstation_dev_fedora -> profile_workstation_dev_common workstation_host_linux -> profile_workstation_gnome workstation_dev_wsl -> packages_ubuntu + services_systemd + profile_workstation_dev_common + profile_workstation_dev_wsl ubuntu_server -> packages_ubuntu + services_systemd + profile_server @@ -320,7 +321,7 @@ ubuntu_server -> packages_ubuntu + services_systemd + profile_server Questo significa che, allo stato attuale: - `ikaros` riceve Linux Mint/Cinnamon come target stabile -- `nymph` riceve Void Linux/Niri come target laptop scrollable-tiling +- `nymph` riceve Fedora Workstation/GNOME come target laptop - il profilo Void resta selezionabile tramite `platform_void + graphical_desktop` per host futuri - la workstation Fedora (`deadalus-fedora`) usa il principio di composizione a gruppi con il ramo Fedora dedicato e con `gsettings` host-specifici dichiarati in inventory - il ramo WSL (`deadalus-wsl`) e predisposto con play dev dedicato @@ -396,9 +397,10 @@ Allo stato attuale questo comando: - distribuisce i dotfiles comuni a tutti gli host - per `platform_void` applica pacchetti Void e servizi runit -- per `platform_void + graphical_desktop` applica bootstrap desktop condiviso, sessioni sway/Hyprland e override specifici per host +- per `platform_void + graphical_desktop` applica bootstrap desktop condiviso, sessioni sway/Hyprland/Niri e override specifici per host - per `platform_mint` e `platform_freebsd` applica solo host presenti esplicitamente in quei gruppi; nell'inventory principale iniziale questi gruppi sono vuoti -- per `workstation_dev_fedora` applica pacchetti Fedora, servizi systemd e profilo dev comune +- per `platform_fedora` applica pacchetti Fedora e servizi systemd +- per `workstation_dev_fedora` applica il profilo dev comune - per `workstation_host_linux` applica il layer host Linux GNOME - per `workstation_dev_wsl` applica pacchetti Ubuntu, servizi systemd, profilo dev comune e tweak WSL dedicati - per gli host `ubuntu_server` applica pacchetti Ubuntu, servizi systemd, profilo server, UFW, dotfiles e template dedicati diff --git a/ansible/inventory/group_vars/desktop_gnome.yml b/ansible/inventory/group_vars/desktop_gnome.yml new file mode 100644 index 0000000..a932a7c --- /dev/null +++ b/ansible/inventory/group_vars/desktop_gnome.yml @@ -0,0 +1,5 @@ +--- +desktop_profile: gnome +desktop_environment: gnome +desktop_sessions_enabled: [] +desktop_default_session: gnome diff --git a/ansible/inventory/group_vars/fedora.yml b/ansible/inventory/group_vars/fedora.yml index d7aa549..9b7a727 100644 --- a/ansible/inventory/group_vars/fedora.yml +++ b/ansible/inventory/group_vars/fedora.yml @@ -27,7 +27,6 @@ fedora_docker_packages: - docker-compose-plugin enabled_services: - - docker - firewalld fedora_dotfiles: diff --git a/ansible/inventory/group_vars/platform_fedora.yml b/ansible/inventory/group_vars/platform_fedora.yml new file mode 100644 index 0000000..b9aa600 --- /dev/null +++ b/ansible/inventory/group_vars/platform_fedora.yml @@ -0,0 +1,5 @@ +--- +platform_profile: fedora +platform_family: redhat +platform_package_manager: dnf +platform_service_manager: systemd diff --git a/ansible/inventory/host_vars/deadalus-fedora.yml b/ansible/inventory/host_vars/deadalus-fedora.yml index 40127ae..a12efb1 100644 --- a/ansible/inventory/host_vars/deadalus-fedora.yml +++ b/ansible/inventory/host_vars/deadalus-fedora.yml @@ -2,7 +2,8 @@ hostname: deadalus-fedora host_packages: [] -host_enabled_services: [] +host_enabled_services: + - docker workstation_firewall_backend: firewalld workstation_host_vscode_extensions: diff --git a/ansible/inventory/host_vars/nymph.yml b/ansible/inventory/host_vars/nymph.yml index c481486..7029e09 100644 --- a/ansible/inventory/host_vars/nymph.yml +++ b/ansible/inventory/host_vars/nymph.yml @@ -1,26 +1,7 @@ --- hostname: nymph -# Void Linux/Niri laptop target. Keep host-specific packages empty until hardware -# support is verified on the installed system. - -# DankLinux / DankMaterialShell (DMS) repositories. -# https://danklinux.com/docs/dankmaterialshell/installation (Void Linux) -# The packages_void role writes each entry to /etc/xbps.d/.conf as -# "repository=" and refreshes the cache with accept_pubkey: true, which -# auto-trusts the DankLinux signing key on first sync. -host_xbps_repositories: - - name: dms - url: https://void.danklinux.com/dms/current - - name: danklinux - url: https://void.danklinux.com/danklinux/current - -# DankMaterialShell. Installing dms pulls in quickshell, dgop, matugen, etc. -# The remainder are the optional features documented for DMS. -host_packages: - - dms - - cava - - dankcalendar - - danksearch - - qt6-multimedia +# Fedora Workstation/GNOME laptop target. GNOME is provided by the base Fedora +# Workstation install and is intentionally not customized by Ansible yet. +host_packages: [] host_enabled_services: [] diff --git a/ansible/inventory/hosts.yml b/ansible/inventory/hosts.yml index d9d4ba5..b573643 100644 --- a/ansible/inventory/hosts.yml +++ b/ansible/inventory/hosts.yml @@ -2,9 +2,14 @@ all: children: platform_void: + hosts: {} + + platform_fedora: hosts: nymph: ansible_connection: local + deadalus-fedora: + ansible_connection: local platform_mint: hosts: @@ -18,6 +23,10 @@ all: children: platform_void: + fedora: + children: + platform_fedora: + graphical_desktop: hosts: ikaros: @@ -35,9 +44,7 @@ all: ansible_connection: local role_lab: - hosts: - nymph: - ansible_connection: local + hosts: {} desktop_sway: hosts: {} @@ -46,6 +53,9 @@ all: hosts: {} desktop_niri: + hosts: {} + + desktop_gnome: hosts: nymph: ansible_connection: local @@ -60,10 +70,6 @@ all: workstation_dev_wsl: ubuntu_server: - fedora: - children: - fedora_workstation: - workstation: children: workstation_host: diff --git a/ansible/roles/packages_fedora/tasks/main.yml b/ansible/roles/packages_fedora/tasks/main.yml index fb6454d..4b0f330 100644 --- a/ansible/roles/packages_fedora/tasks/main.yml +++ b/ansible/roles/packages_fedora/tasks/main.yml @@ -26,7 +26,9 @@ gpgcheck: true gpgkey: https://download.docker.com/linux/fedora/gpg state: present - when: fedora_manage_docker_repo | default(false) + when: + - "'workstation_dev_fedora' in group_names" + - fedora_manage_docker_repo | default(false) - name: Configure Google Chrome repository on Fedora tags: [packages] @@ -82,14 +84,22 @@ ( (common_packages | default([])) + (fedora_packages_base | default([])) - + (fedora_docker_packages | default([])) + + ( + (fedora_docker_packages | default([])) + if 'workstation_dev_fedora' in group_names + else [] + ) + ( ['google-chrome-stable'] if workstation_manage_google_chrome | default(false) else [] ) + (profile_packages | default([])) - + (fedora_workstation_dev_packages | default(workstation_dev_packages | default([]))) + + ( + (fedora_workstation_dev_packages | default(workstation_dev_packages | default([]))) + if 'workstation_dev_fedora' in group_names + else [] + ) + ( (workstation_host_linux_packages_fedora | default(workstation_host_linux_packages | default([]))) if 'workstation_host_linux' in group_names @@ -115,7 +125,9 @@ name: "{{ effective_username }}" groups: docker append: true - when: (fedora_docker_packages | default([])) | length > 0 + when: + - "'workstation_dev_fedora' in group_names" + - (fedora_docker_packages | default([])) | length > 0 - name: Ensure Flathub remote is configured for Fedora workstation tags: [packages] diff --git a/ansible/site.yml b/ansible/site.yml index 928d77e..b687081 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -94,13 +94,19 @@ roles: - profile_desktop_niri_freebsd -- name: Configure Fedora workstation development layer - hosts: workstation_dev_fedora +- name: Configure Fedora platform + hosts: platform_fedora become: true roles: - packages_fedora - services_systemd + +- name: Configure Fedora workstation development layer + hosts: workstation_dev_fedora + become: true + + roles: - profile_workstation_dev_common - name: Configure native Linux workstation host layer