From 945ed455c9150beefd4beae847f2feb00f1fb919 Mon Sep 17 00:00:00 2001 From: kenji Date: Mon, 30 Jun 2025 15:45:32 -0500 Subject: [PATCH] added security.nix --- modules/de.nix | 1 + system/security.nix | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 system/security.nix diff --git a/modules/de.nix b/modules/de.nix index beca8bb..317cc10 100644 --- a/modules/de.nix +++ b/modules/de.nix @@ -9,6 +9,7 @@ ../system/browser.nix ../system/wayland.nix ../system/graphics.nix + ../system/security.nix # FIXME ../system/amd.nix diff --git a/system/security.nix b/system/security.nix new file mode 100644 index 0000000..9672b31 --- /dev/null +++ b/system/security.nix @@ -0,0 +1,12 @@ +{...}: { + security.polkit.enable = true; + security.polkit.extraConfig = '' + polkit.addRule(function(action, subject) { + if ((action.id == "org.corectrl.helper.gpu.set" || + action.id == "org.corectrl.helper.gpu.apply") && + subject.isInGroup("wheel")) { + return polkit.Result.YES; + } + }); + ''; +}