From 20d087d2ef2b060d4faf0a33d1058ca89ebb949e Mon Sep 17 00:00:00 2001 From: Fabio Scotto di Santolo Date: Wed, 22 Apr 2026 17:11:30 +0200 Subject: [PATCH] Enhance Sway/Noctalia integration and align desktop docs - Add canonical usb-drive-manager plugin to Noctalia (symlink from official) - Remove nm-applet and blueman packages from nymph Sway session - Run udiskie without tray (backend for automount/LUKS, UI via usb-drive-manager) - Add screenOverrides support to Noctalia bar via inventory variables - Add host_packages_absent task to packages_void role - Update desktop docs with full plugin list and config layering - Add focused validation check for Sway/Noctalia bootstrap --- AGENTS.md | 5 ++++ README.md | 28 ++++++++++--------- ansible/inventory/group_vars/desktop.yml | 2 ++ ansible/inventory/host_vars/nymph.yml | 11 ++++++++ ansible/roles/packages_void/tasks/main.yml | 9 +++++- .../profile_desktop_sway/tasks/noctalia.yml | 16 +++++++++++ .../templates/noctalia-settings.json.j2 | 9 +++++- .../templates/shell.conf.j2 | 2 +- .../desktop/.config/noctalia/plugins.json | 4 +++ 9 files changed, 70 insertions(+), 16 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 2348270..b88f700 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -39,6 +39,7 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux workstation - Server: `ansible-playbook ansible/site.yml --limit prometheus --check --diff` - Focused checks: - Emacs dotfiles only: `ansible-playbook ansible/site.yml --limit ikaros --tags emacs --check --diff` or `--limit nymph --tags emacs --check --diff` + - Sway/Noctalia bootstrap on nymph: `ansible-playbook ansible/site.yml --limit nymph --tags packages,dotfiles:desktop,sway --check --diff` - Mail bootstrap: `sh -n scripts/bootstrap_mail.sh` and `shellcheck scripts/bootstrap_mail.sh` - Windows bootstrap parse: `pwsh -NoProfile -Command "[void][System.Management.Automation.Language.Parser]::ParseFile('scripts/bootstrap_windows_workstation.ps1', [ref]$null, [ref]$null)"` - Server compose render: `docker compose -f /opt/docker/server/docker-compose.yml config` @@ -60,6 +61,10 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux workstation - `dotfiles/desktop/.xinitrc` - `dotfiles/desktop/.local/bin/start-sway-session` - Do not auto-restart `emptty` during playbook runs on active desktop hosts; restart it manually from another TTY/SSH session if needed. +- `profile_desktop_sway` owns the Sway session, Noctalia config rendering, and official plugin linking. +- Noctalia shared config lives in `dotfiles/desktop/.config/noctalia/`; bar monitors and `screenOverrides` come from inventory (`noctalia_bar_monitors`, `noctalia_screen_overrides`). +- On Sway hosts, `udiskie` is the backend for automount/LUKS but runs without tray; USB device UI is handled by `usb-drive-manager`. +- Do not re-introduce `network-manager-applet` or `blueman` on Sway hosts without an explicit host-specific reason. ## Workstation / Windows Notes - Native Linux workstation hosts can combine `workstation_host_linux` with an OS-specific dev group. diff --git a/README.md b/README.md index 90319e8..d86fb2c 100644 --- a/README.md +++ b/README.md @@ -79,20 +79,22 @@ Macchine: Queste macchine condividono la stessa configurazione base desktop e vengono mantenute allineate tramite Ansible. -Lo stato attuale del profilo desktop include, tra le altre cose: - -- dotfiles comuni e desktop -- sessione i3 su `ikaros` e sessione SwayFX su `nymph` -- `emptty` con default host-specific per il desktop attivo su ogni host -- pacchetti Void Linux e servizi runit -- `turnstile` per i servizi utente, inclusi `emacs` e `ssh-agent` -- `ssh-agent` con socket stabile condiviso tra shell, SSH ed Emacs in `~/.local/state/ssh-agent/socket` +Lo stato attuale del profilo desktop include, tra le altre cose: + +- dotfiles comuni e desktop +- sessione i3 su `ikaros` e sessione Sway su `nymph` +- `emptty` con default host-specific per il desktop attivo su ogni host +- pacchetti Void Linux e servizi runit +- `turnstile` per i servizi utente, inclusi `emacs` e `ssh-agent` +- `ssh-agent` con socket stabile condiviso tra shell, SSH ed Emacs in `~/.local/state/ssh-agent/socket` - `.emacs.d` distribuito da un task dedicato Ansible con tag `emacs` -- `tmux` con plugin gestiti da TPM al bootstrap del profilo desktop -- Flatpak con remoto Flathub -- GNOME Keyring e bootstrap della posta via script dedicato -- shell Noctalia per SwayFX su `nymph`, con plugin per clipboard, polkit e screenshot -- `kanshi` su `nymph` per il profilo monitor Wayland, con workspace Sway deterministici: in dual monitor `1` resta su `eDP-1` e `2-10` vanno su `DP-1`, mentre in laptop-only tutti tornano su `eDP-1` +- `tmux` con plugin gestiti da TPM al bootstrap del profilo desktop +- Flatpak con remoto Flathub +- GNOME Keyring e bootstrap della posta via script dedicato +- shell Noctalia su Sway su `nymph`, con plugin ufficiali per clipboard (`clipper`), polkit (`polkit-agent`), screenshot (`screenshot`) e gestione USB (`usb-drive-manager`); config condivisa in `dotfiles/desktop/.config/noctalia/` e `settings.json` renderizzato da template Ansible con variabili host-specifiche +- `udiskie` come backend per automount/LUKS su Sway, senza tray; la UI dei dispositivi removibili รจ demandata a `usb-drive-manager` +- `kanshi` su `nymph` per il profilo monitor Wayland, con workspace Sway deterministici: in dual monitor `1` resta su `eDP-1` e `2-10` vanno su `DP-1`, mentre in laptop-only tutti tornano su `eDP-1` +- monitor Noctalia e `screenOverrides` dichiarati in inventory (`noctalia_bar_monitors`, `noctalia_screen_overrides`) per host `nymph` --- diff --git a/ansible/inventory/group_vars/desktop.yml b/ansible/inventory/group_vars/desktop.yml index 80db3dd..f6864da 100644 --- a/ansible/inventory/group_vars/desktop.yml +++ b/ansible/inventory/group_vars/desktop.yml @@ -298,6 +298,8 @@ desktop_sway_dotfiles: noctalia_bar_monitors: - DP-1 +noctalia_screen_overrides: [] + desktop_flatpak_packages: - be.alexandervanhee.gradia - ch.protonmail.protonmail-bridge diff --git a/ansible/inventory/host_vars/nymph.yml b/ansible/inventory/host_vars/nymph.yml index ff3bf9b..5121898 100644 --- a/ansible/inventory/host_vars/nymph.yml +++ b/ansible/inventory/host_vars/nymph.yml @@ -42,3 +42,14 @@ host_sway_dotfiles: noctalia_bar_monitors: - DP-1 + - eDP-1 + +noctalia_screen_overrides: + - name: DP-1 + enabled: false + - name: eDP-1 + enabled: false + +host_packages_absent: + - network-manager-applet + - blueman diff --git a/ansible/roles/packages_void/tasks/main.yml b/ansible/roles/packages_void/tasks/main.yml index d551070..4f0f422 100644 --- a/ansible/roles/packages_void/tasks/main.yml +++ b/ansible/roles/packages_void/tasks/main.yml @@ -71,4 +71,11 @@ | unique }} state: present - update_cache: false \ No newline at end of file + update_cache: false + +- name: Remove host-absent packages on Void Linux + tags: [packages] + community.general.xbps: + name: "{{ host_packages_absent | default([]) }}" + state: absent + when: (host_packages_absent | default([])) | length > 0 \ No newline at end of file diff --git a/ansible/roles/profile_desktop_sway/tasks/noctalia.yml b/ansible/roles/profile_desktop_sway/tasks/noctalia.yml index cbacdeb..caaed9a 100644 --- a/ansible/roles/profile_desktop_sway/tasks/noctalia.yml +++ b/ansible/roles/profile_desktop_sway/tasks/noctalia.yml @@ -113,6 +113,21 @@ owner: "{{ username }}" group: "{{ user_group }}" +- name: Check if usb-drive-manager is a real directory (needs migration to symlink) + ansible.builtin.stat: + path: "{{ user_home }}/.config/noctalia/plugins/usb-drive-manager" + follow: false + register: usb_drive_manager_path_state + +- name: Remove old usb-drive-manager directory (migration to symlink) + ansible.builtin.file: + path: "{{ user_home }}/.config/noctalia/plugins/usb-drive-manager" + state: absent + when: + - usb_drive_manager_path_state.stat.exists + - usb_drive_manager_path_state.stat.isdir + - not (usb_drive_manager_path_state.stat.islnk | default(false)) + - name: Link official Noctalia plugins ansible.builtin.file: src: "{{ user_home }}/.local/share/noctalia-plugins/official/{{ item }}" @@ -124,3 +139,4 @@ loop: - polkit-agent - screenshot + - usb-drive-manager diff --git a/ansible/roles/profile_desktop_sway/templates/noctalia-settings.json.j2 b/ansible/roles/profile_desktop_sway/templates/noctalia-settings.json.j2 index 7360639..b375623 100644 --- a/ansible/roles/profile_desktop_sway/templates/noctalia-settings.json.j2 +++ b/ansible/roles/profile_desktop_sway/templates/noctalia-settings.json.j2 @@ -70,7 +70,14 @@ "rightClickAction": "controlCenter", "rightClickCommand": "", "rightClickFollowMouse": true, - "screenOverrides": [], + "screenOverrides": [ +{% for override in noctalia_screen_overrides | default([]) %} + { + "enabled": {{ override.enabled | lower }}, + "name": "{{ override.name }}" + }{% if not loop.last %},{% endif %} +{% endfor %} + ], "showCapsule": true, "showOnWorkspaceSwitch": true, "showOutline": false, diff --git a/ansible/roles/profile_desktop_sway/templates/shell.conf.j2 b/ansible/roles/profile_desktop_sway/templates/shell.conf.j2 index d69c8e5..6ee5daa 100644 --- a/ansible/roles/profile_desktop_sway/templates/shell.conf.j2 +++ b/ansible/roles/profile_desktop_sway/templates/shell.conf.j2 @@ -22,7 +22,7 @@ exec pipewire exec pipewire-pulse exec wireplumber exec kanshi -exec udiskie +exec udiskie --no-tray exec wl-paste --watch cliphist store exec qs -c noctalia-shell diff --git a/dotfiles/desktop/.config/noctalia/plugins.json b/dotfiles/desktop/.config/noctalia/plugins.json index 400f1f5..435db85 100644 --- a/dotfiles/desktop/.config/noctalia/plugins.json +++ b/dotfiles/desktop/.config/noctalia/plugins.json @@ -18,6 +18,10 @@ "screenshot": { "enabled": true, "sourceUrl": "https://github.com/noctalia-dev/noctalia-plugins" + }, + "usb-drive-manager": { + "enabled": true, + "sourceUrl": "https://github.com/noctalia-dev/noctalia-plugins" } }, "version": 2