From 6abdc028afc41acdc27f4e7cb9298d5b495705b1 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 26 Nov 2026 13:18:51 +0000 Subject: qi: let default suspend, reboot and power off --- systems/qi/config.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/systems/qi/config.nix b/systems/qi/config.nix index d04aaf72..3588ad62 100644 --- a/systems/qi/config.nix +++ b/systems/qi/config.nix @@ -166,6 +166,19 @@ services.logind.powerKey = "ignore"; services.logind.powerKeyLongPress = "poweroff"; + security.polkit.extraConfig = '' + polkit.addRule(function(action, subject) { + if ((action.id.indexOf("org.freedesktop.login1.suspend") == 0 + || action.id.indexOf("org.freedesktop.login1.reboot") == 0 + || action.id.indexOf("org.freedesktop.login1.power-off") == 0 + || action.id.indexOf("org.freedesktop.inhibit") == 0) + && subject.user == "default") + { + return polkit.Result.YES; + } + }); + ''; + security.rtkit.enable = true; services.pipewire = { -- cgit v1.3.1