diff options
Diffstat (limited to 'systems/qi')
| -rw-r--r-- | systems/qi/config.nix | 13 |
1 files changed, 13 insertions, 0 deletions
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 = { |
