From 660b3318c96b1262f47141e2bf4408fe23508499 Mon Sep 17 00:00:00 2001 From: CodeMaster4711 Date: Sun, 4 Oct 2026 15:32:07 +0200 Subject: [PATCH] fix: allow node reboot and poweroff while other sessions are logged in --- modules/csfx-agent.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/csfx-agent.nix b/modules/csfx-agent.nix index 7310012..560364e 100644 --- a/modules/csfx-agent.nix +++ b/modules/csfx-agent.nix @@ -140,8 +140,15 @@ in subject.user == "csfx-agent") { return polkit.Result.YES; } - if ((action.id == "org.freedesktop.login1.reboot" || - action.id == "org.freedesktop.login1.power-off") && + var powerActions = [ + "org.freedesktop.login1.reboot", + "org.freedesktop.login1.reboot-multiple-sessions", + "org.freedesktop.login1.reboot-ignore-inhibit", + "org.freedesktop.login1.power-off", + "org.freedesktop.login1.power-off-multiple-sessions", + "org.freedesktop.login1.power-off-ignore-inhibit" + ]; + if (powerActions.indexOf(action.id) !== -1 && subject.user == "csfx-agent") { return polkit.Result.YES; }