From 0aecf7318324cfa18431e9846ba8cd2ab1d426a2 Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Tue, 6 Feb 2024 14:58:18 -0600 Subject: [PATCH] enable polkit with config for corectrl --- configuration.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index 04d9d1b..cdf7a5d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -254,7 +254,22 @@ in ]; groups = [ "wheel" ]; }]; -}; + }; + + security.polkit = { + enable = true; + extraConfig = '' + polkit.addRule(function(action, subject) { + if ((action.id == "org.corectrl.helper.init" || + action.id == "org.corectrl.helperkiller.init") && + subject.local == true && + subject.active == true && + subject.isInGroup("wheel")) { + return polkit.Result.YES; + } + }); + ''; + }; # Some programs need SUID wrappers, can be configured further or are # started in user sessions.