Move nymph to target Void+Niri

This commit is contained in:
Fabio Scotto di Santolo
2026-07-17 17:42:05 +02:00
parent 8eabc5b340
commit 2bfe6fd8fa
13 changed files with 354 additions and 194 deletions

View File

@@ -12,8 +12,8 @@ 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_freebsd + role_lab + desktop_niri`
- Void desktop profile remains available for future/reference hosts via `platform_void + graphical_desktop`
- Current laptop/lab: `nymph = platform_void + role_lab + desktop_niri`
- 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`
- Ubuntu server: `prometheus`
@@ -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`
- FreeBSD laptop work: `ansible-playbook ansible/site.yml --limit nymph --check --diff`
- Void 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`
@@ -57,7 +57,7 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux Mint and Fr
## 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` and `profile_desktop_hyprland`, `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_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.
- 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,9 +66,10 @@ 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)
- FreeBSD Niri must keep FreeBSD-specific package, rc, DBus, seat, portal, and launcher behavior in `profile_desktop_niri_freebsd` or FreeBSD platform vars.
- 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`.
- 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 FreeBSD/Niri laptop target; prefer minimal scrollable-tiling defaults first, then host-specific tuning after real use.
- `nymph` is the Void/Niri laptop target; prefer minimal scrollable-tiling defaults first, then host-specific tuning 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.

View File

@@ -71,7 +71,7 @@ Matrice target:
| Host | Platform | Role | Desktop |
| -------------- | ---------- | -------------------- | --------------------------------- |
| ikaros | Linux Mint | Personal workstation | Cinnamon |
| nymph | FreeBSD | Lab | Niri |
| nymph | Void Linux | Lab | Niri |
| void-reference | Void Linux | Lab/reference | Current preserved desktop profile |
Regola operativa:
@@ -82,7 +82,7 @@ nymph is allowed to break
```
`ikaros` usa il target stabile Linux Mint/Cinnamon; `nymph` usa il target
FreeBSD/Niri per il workflow laptop scrollable-tiling. I gruppi legacy `void` e
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_*`.
@@ -106,7 +106,7 @@ Nota sullo stato attuale del playbook principale:
Target operativi:
- `ikaros`: Linux Mint + Cinnamon, desktop personale stabile/floating.
- `nymph`: FreeBSD + Niri, laptop scrollable-tiling per sfruttare meglio lo schermo piccolo.
- `nymph`: Void Linux + Niri, laptop scrollable-tiling per sfruttare meglio lo schermo piccolo.
Il profilo Void desktop resta disponibile come modello riutilizzabile per host
futuri. `desktop_environment` continua a selezionare in modo esclusivo
@@ -252,7 +252,7 @@ Esempi correnti:
```text
ikaros -> common + platform_mint + role_personal_workstation + desktop_cinnamon + ikaros
nymph -> common + platform_freebsd + role_lab + desktop_niri + nymph
nymph -> common + platform_void + role_lab + desktop_niri + nymph
```
Questo approccio consente di:
@@ -320,7 +320,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 FreeBSD/Niri come target laptop scrollable-tiling
- `nymph` riceve Void Linux/Niri come target laptop scrollable-tiling
- 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

View File

@@ -1,3 +1,5 @@
---
desktop_profile: niri
desktop_sessions_enabled:
- niri
desktop_default_session: niri

View File

@@ -221,6 +221,28 @@ desktop_hyprland_packages:
- xdg-desktop-portal-hyprland
- xorg-server-xwayland
desktop_niri_packages:
- cliphist
- dunst
- foot
- foot-terminfo
- gtklock
- grim
- niri
- rofi
- slurp
- SwayOSD
- Waybar
- wl-clipboard
- xdg-desktop-portal-gtk
- xorg-server-xwayland
void_lab_packages:
- llvm
- podman
- qemu
- smartmontools
profile_packages:
- bash-language-server
- bluez

View File

@@ -1,7 +1,7 @@
---
hostname: nymph
# FreeBSD/Niri laptop target. Keep host-specific packages empty until hardware
# Void Linux/Niri laptop target. Keep host-specific packages empty until hardware
# support is verified on the installed system.
host_packages: []
host_enabled_services: []

View File

@@ -2,7 +2,9 @@
all:
children:
platform_void:
hosts: {}
hosts:
nymph:
ansible_connection: local
platform_mint:
hosts:
@@ -10,9 +12,7 @@ all:
ansible_connection: local
platform_freebsd:
hosts:
nymph:
ansible_connection: local
hosts: {}
void:
children:

View File

@@ -76,6 +76,14 @@
)
else []
)
+ (
(desktop_niri_packages | default([]))
if (
(desktop_environment | default('minimal')) == 'minimal'
and 'niri' in (desktop_sessions_enabled | default([]))
)
else []
)
| unique
}}
@@ -88,6 +96,7 @@
(desktop_minimal_packages | default([]))
+ (desktop_sway_packages | default([]))
+ (desktop_hyprland_packages | default([]))
+ (desktop_niri_packages | default([]))
+ (desktop_xfce_packages | default([]))
+ (desktop_kde_packages | default([]))
)
@@ -109,6 +118,7 @@
+ (desktop_common_packages | default([]))
+ ((desktop_emacs_packages | default([])) if (emacs_enabled | default(false) | bool) else [])
+ (packages_void_selected_desktop_packages | default([]))
+ ((void_lab_packages | default([])) if 'role_lab' in group_names else [])
+ (host_packages | default([]))
)
| unique

View File

@@ -9,7 +9,7 @@
or (desktop_sessions_enabled | default([]) | length > 0)
- >-
(desktop_environment | default('minimal')) != 'minimal'
or (desktop_sessions_enabled | default([]) | difference(['sway', 'hyprland']) | length == 0)
or (desktop_sessions_enabled | default([]) | difference(['sway', 'hyprland', 'niri']) | length == 0)
- >-
(desktop_environment | default('minimal')) != 'minimal'
or desktop_default_session in (desktop_sessions_enabled | default([]))

View File

@@ -0,0 +1,4 @@
[preferred]
default=gtk
org.freedesktop.impl.portal.Screenshot=gtk
org.freedesktop.impl.portal.ScreenCast=gtk

View File

@@ -0,0 +1,5 @@
[Desktop Entry]
Name=Niri
Comment=Niri scrollable-tiling (Wayland)
Exec=/usr/local/bin/start-niri
Type=Application

View File

@@ -0,0 +1,81 @@
---
- name: Ensure niri config directories exist
tags: [dotfiles, dotfiles:desktop, niri]
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0755"
loop:
- "{{ user_home }}/.config/foot"
- "{{ user_home }}/.config/dunst"
- "{{ user_home }}/.config/rofi"
- "{{ user_home }}/.config/waybar"
- "{{ user_home }}/.config/niri"
when:
- (desktop_environment | default('minimal')) == 'minimal'
- "'niri' in (desktop_sessions_enabled | default([]))"
- name: Install allowed emptty Wayland sessions
tags: [packages, services, emptty, niri]
ansible.builtin.copy:
src: niri.desktop
dest: /etc/emptty/wayland-sessions/niri.desktop
owner: root
group: root
mode: "0644"
when:
- (desktop_environment | default('minimal')) == 'minimal'
- "'niri' in (desktop_sessions_enabled | default([]))"
- name: Install Niri session launcher in /usr/local/bin
tags: [packages, services, niri]
ansible.builtin.copy:
src: "{{ playbook_dir }}/../dotfiles/desktop/.local/bin/start-niri"
dest: /usr/local/bin/start-niri
owner: root
group: root
mode: "0755"
when:
- (desktop_environment | default('minimal')) == 'minimal'
- "'niri' in (desktop_sessions_enabled | default([]))"
- name: Ensure /etc/xdg/xdg-desktop-portal exists
tags: [packages, services, niri, portal]
ansible.builtin.file:
path: /etc/xdg/xdg-desktop-portal
state: directory
owner: root
group: root
mode: "0755"
when:
- (desktop_environment | default('minimal')) == 'minimal'
- "'niri' in (desktop_sessions_enabled | default([]))"
- name: Configure xdg-desktop-portal backend preferences for niri
tags: [packages, services, niri, portal]
ansible.builtin.copy:
src: niri-portals.conf
dest: /etc/xdg/xdg-desktop-portal/niri-portals.conf
owner: root
group: root
mode: "0644"
when:
- (desktop_environment | default('minimal')) == 'minimal'
- "'niri' in (desktop_sessions_enabled | default([]))"
- name: Copy niri desktop dotfiles
tags: [dotfiles, dotfiles:desktop, niri]
ansible.builtin.copy:
src: "{{ playbook_dir }}/../dotfiles/desktop/{{ item.src }}"
dest: "{{ user_home }}/{{ item.dest }}"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "{{ item.mode }}"
loop: "{{ desktop_niri_dotfiles | default([]) }}"
loop_control:
label: "{{ item.dest }}"
when:
- (desktop_environment | default('minimal')) == 'minimal'
- "'niri' in (desktop_sessions_enabled | default([]))"

View File

@@ -38,10 +38,18 @@
- profile_desktop_common
- profile_desktop_sway
- profile_desktop_hyprland
- profile_desktop_niri
- profile_desktop_kde
- profile_desktop_xfce
- profile_desktop_host
- name: Configure lab role on Void
hosts: platform_void:&role_lab
become: true
roles:
- profile_lab
- name: Configure Linux Mint platform
hosts: platform_mint
become: true

View File

@@ -0,0 +1,27 @@
#!/bin/sh
[ -r /etc/profile ] && . /etc/profile
[ -r "$HOME/.profile" ] && . "$HOME/.profile"
export XDG_CURRENT_DESKTOP=niri
export XDG_SESSION_DESKTOP=niri
export XDG_SESSION_TYPE=wayland
export MOZ_ENABLE_WAYLAND=1
export QT_QPA_PLATFORM='wayland;xcb'
export _JAVA_AWT_WM_NONREPARENTING=1
export SDL_VIDEODRIVER=wayland
export GDK_BACKEND='wayland,x11'
export SSH_AUTH_SOCK="$HOME/.local/state/ssh-agent/socket"
# Per-host session environment (GPU / Wayland tuning, etc.)
[ -r "$HOME/.config/niri/session-env" ] && . "$HOME/.config/niri/session-env"
exec dbus-run-session sh -eu -c '
umask 077
printf "%s\n" "$DBUS_SESSION_BUS_ADDRESS" > "$HOME/.dbus-session-bus-address"
gpgconf --launch gpg-agent
"$HOME/.local/bin/update-turnstile-env"
exec niri --session
'