diff options
| author | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-10-31 17:05:58 +0100 |
|---|---|---|
| committer | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-10-31 17:05:58 +0100 |
| commit | ff86b518167bb87fc68b96f6d760a606ec237c09 (patch) | |
| tree | 551d56d4f228f0484a4f01e8a533efa923df75a7 | |
| parent | 3f5c903088bfe9b4c16821248f684a4252b394e5 (diff) | |
| download | nixos-ff86b518167bb87fc68b96f6d760a606ec237c09.tar nixos-ff86b518167bb87fc68b96f6d760a606ec237c09.tar.gz nixos-ff86b518167bb87fc68b96f6d760a606ec237c09.tar.bz2 nixos-ff86b518167bb87fc68b96f6d760a606ec237c09.tar.xz nixos-ff86b518167bb87fc68b96f6d760a606ec237c09.zip | |
allow systemctl operations to admins without auth
| -rw-r--r-- | hel.nix | 13 |
1 files changed, 13 insertions, 0 deletions
| @@ -310,6 +310,19 @@ | |||
| 310 | source = ''${pkgs.callPackage ./custom/notify-user.nix { inherit (pkgs.haskellPackages) ghcWithPackages; }}/bin/notify-gkleen''; | 310 | source = ''${pkgs.callPackage ./custom/notify-user.nix { inherit (pkgs.haskellPackages) ghcWithPackages; }}/bin/notify-gkleen''; |
| 311 | } | 311 | } |
| 312 | ]; | 312 | ]; |
| 313 | |||
| 314 | polkit = { | ||
| 315 | enable = true; | ||
| 316 | extraConfig = '' | ||
| 317 | polkit.addRule(function(action, subject) { | ||
| 318 | if ( action.id == "org.freedesktop.systemd1.manage-units" | ||
| 319 | && subject.isInGroup("admin") | ||
| 320 | ) { | ||
| 321 | return polkit.Result.YES; | ||
| 322 | } | ||
| 323 | }); | ||
| 324 | ''; | ||
| 325 | }; | ||
| 313 | }; | 326 | }; |
| 314 | 327 | ||
| 315 | time.timeZone = "Europe/Berlin"; | 328 | time.timeZone = "Europe/Berlin"; |
