aboutsummaryrefslogtreecommitdiff
path: root/modules/services/polkit.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services/polkit.nix')
-rw-r--r--modules/services/polkit.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/services/polkit.nix b/modules/services/polkit.nix
new file mode 100644
index 0000000..4cc5fce
--- /dev/null
+++ b/modules/services/polkit.nix
@@ -0,0 +1,25 @@
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}:
+{
+ options.nx.services.polkit.enable = lib.mkEnableOption "Enable and setup polkit service";
+ config = lib.mkIf config.nx.services.polkit.enable {
+ security.polkit.enable = true;
+ systemd.services.polkit-gnome-authenticator-agent-1 = {
+ description = "polkit-gnome-authentication-agent-1";
+ wantedBy = [ "graphical-session.target" ];
+ wants = [ "graphical-session.target" ];
+ after = [ "graphical-session.target" ];
+ serviceConfig = {
+ Type = "simple";
+ ExecStart = "${pkgs.polkit_gnome}/bin/polkit-gnome-authentication-agent-1";
+ Restart = "on-failure";
+ RestartSec = 1;
+ TimeoutStopSec = 10;
+ };
+ };
+ };
+}