Polkit agent + libvirt group (fixes virt-manager connection failure) #4

Merged
yuri merged 7 commits from fix/polkit-agent-libvirt into main 2026-10-27 15:28:59 +01:00
2 changed files with 14 additions and 10 deletions
Showing only changes of commit dbf75d1239 - Show all commits
-10
View File
@@ -28,14 +28,4 @@ install_nerd_font JetBrainsMono
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."
+14
View File
@@ -533,6 +533,20 @@ run_advanced_menu() {
install_category_pkgs() {
local cat="$1"; shift
case "$cat" in
Virtualisation)
# qemu:///system without password prompts: libvirt group + enabled
# daemon. Only when the picked packages actually use libvirt.
local wants_libvirt=false item
for item in "$@"; do
[[ "$item" == *libvirt* || "$item" == *virt-manager* || "$item" == *virt-install* ]] && wants_libvirt=true
done
if $wants_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
warn "libvirt group membership applies after re-login."
fi
;;
Browsers)
local needs_chrome=false needs_brave=false item
for item in "$@"; do