diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 763b4ce..7e05de4 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -11,6 +11,7 @@ in { ./helix-desktop.nix ./open-in-blackbox.nix ./bluetooth.nix + ./pkexec.nix ]; services.xserver = { diff --git a/modules/desktop/pkexec.nix b/modules/desktop/pkexec.nix new file mode 100644 index 0000000..70bc308 --- /dev/null +++ b/modules/desktop/pkexec.nix @@ -0,0 +1,16 @@ +{ + security.polkit.extraConfig = /*javascript*/ '' + polkit.addRule(function(action, subject) { + if ( + action.id == "org.freedesktop.policykit.exec" && + subject.isInGroup("wheel") + ) { + if (subject.active) { + return polkit.Result.AUTH_SELF_KEEP; + } else { + return polkit.Result.AUTH_SELF; + } + } + }); + ''; +}