diff options
| author | tv <tv@krebsco.de> | 2026-11-26 13:18:51 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-26 13:18:51 +0000 |
| commit | 6abdc028afc41acdc27f4e7cb9298d5b495705b1 (patch) | |
| tree | 654a5430873875bc06276cd8440a0e756c83e27c /systems/qi/config.nix | |
| parent | 7570b931056c740af8181f0985d2a5caa341371d (diff) | |
qi: let default suspend, reboot and power off
Diffstat (limited to 'systems/qi/config.nix')
| -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 = { |
