virt-manager on niri/Noctalia failed with 'authentication unavailable: no polkit agent available to authenticate action org.libvirt.unix.manage' - bare compositors ship no polkit agent, unlike GNOME/KDE. Two fixes: - install_session_prereqs installs polkit-gnome and wires its agent .desktop into /etc/xdg/autostart (paths overridable for testing). - niri module optionally installs the qemu/libvirt stack, enables libvirtd, and adds the user to the libvirt group: members manage qemu:///system with no polkit prompt at all (the real fix; applies after re-login).
42 lines
1.4 KiB
Bash
Executable File
42 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
set -uo pipefail
|
|
|
|
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
# shellcheck source=../../lib/common.sh
|
|
source "$HERE/../../lib/common.sh"
|
|
# shellcheck source=../../lib/session.sh
|
|
source "$HERE/../../lib/session.sh"
|
|
|
|
if is_debug; then set +e; else set -e; fi
|
|
|
|
step "Tiling window manager: Niri"
|
|
rule
|
|
|
|
# Noctalia is in the Fedora repos since F44 (noctalia 5.3.0 in updates) —
|
|
# no third-party repo needed for this module. (Terra stays in the base
|
|
# section; mangowc still requires it.)
|
|
info "Installing Niri + Noctalia..."
|
|
install_packages niri noctalia fuzzel alacritty
|
|
# niri is Wayland-only; this lets X11 apps run inside it
|
|
install_optional xwayland-satellite
|
|
install_optional xdg-desktop-portal-wlr
|
|
|
|
install_session_prereqs
|
|
install_nerd_font JetBrainsMono
|
|
|
|
# niri ships /usr/share/wayland-sessions/niri.desktop itself, so no entry needed.
|
|
install_packages sddm
|
|
switch_display_manager sddm
|
|
|
|
# virt-manager/qemu:///system without password prompts: libvirt group +
|
|
# enabled daemon. Group membership applies to NEW sessions (re-login).
|
|
install_optional qemu-kvm libvirt virt-install virt-manager virt-viewer
|
|
if pkg_installed libvirt; then
|
|
info "Enabling libvirtd and adding $USER to the libvirt group..."
|
|
sudo systemctl enable --now libvirtd 2>/dev/null || true
|
|
sudo usermod -aG libvirt "$USER" || true
|
|
info "Group membership applies after re-login."
|
|
fi
|
|
|
|
ok "Niri setup complete. Log out and pick Niri in SDDM."
|