From 75ae0d5e8728feefea506d314b4b5e1b907df4c5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 25 Apr 2018 16:39:21 +0200 Subject: wheel may manage units --- odin.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/odin.nix b/odin.nix index b3c9b6ea..a0767915 100644 --- a/odin.nix +++ b/odin.nix @@ -313,6 +313,19 @@ } ]; + security.polkit = { + enable = true; + extraConfig = '' + polkit.addRule(function(action, subject) { + if ( action.id == "org.freedesktop.systemd1.manage-units" + && subject.isInGroup("wheel") + ) { + return polkit.Result.YES; + } + }); + ''; + }; + systemd.status-mail = { recipient = "root@odin.asgard.yggdrasil"; onFailure = [ "nixos-upgrade" -- cgit v1.2.3