summary refs log tree commit diff
path: root/nixos/modules/services/system
diff options
context:
space:
mode:
authorMichael Peyton Jones <me@michaelpj.com>2018-08-09 15:50:53 +0100
committerMichael Peyton Jones <me@michaelpj.com>2018-08-14 15:55:05 +0100
commit80d4fa725bc0a61c11c51a392c95561442d795f5 (patch)
tree8e714fdcc79866bac5c05ae1509b4059a6200c10 /nixos/modules/services/system
parent316669327c6cb0e85dc522f0b7af55db33474553 (diff)
downloadnixlib-80d4fa725bc0a61c11c51a392c95561442d795f5.tar
nixlib-80d4fa725bc0a61c11c51a392c95561442d795f5.tar.gz
nixlib-80d4fa725bc0a61c11c51a392c95561442d795f5.tar.bz2
nixlib-80d4fa725bc0a61c11c51a392c95561442d795f5.tar.lz
nixlib-80d4fa725bc0a61c11c51a392c95561442d795f5.tar.xz
nixlib-80d4fa725bc0a61c11c51a392c95561442d795f5.tar.zst
nixlib-80d4fa725bc0a61c11c51a392c95561442d795f5.zip
localtime: simplify module a little
Diffstat (limited to 'nixos/modules/services/system')
-rw-r--r--nixos/modules/services/system/localtime.nix10
1 files changed, 2 insertions, 8 deletions
diff --git a/nixos/modules/services/system/localtime.nix b/nixos/modules/services/system/localtime.nix
index b9355bbb9441..c7e897c96448 100644
--- a/nixos/modules/services/system/localtime.nix
+++ b/nixos/modules/services/system/localtime.nix
@@ -22,14 +22,8 @@ in {
   config = mkIf cfg.enable {
     services.geoclue2.enable = true;
 
-    security.polkit.extraConfig = ''
-     polkit.addRule(function(action, subject) {
-       if (action.id == "org.freedesktop.timedate1.set-timezone"
-           && subject.user == "localtimed") {
-         return polkit.Result.YES;
-       }
-     });
-    '';
+    # so polkit will pick up the rules
+    environment.systemPackages = [ pkgs.localtime ];
 
     users.users = [{
       name = "localtimed";