diff options
Diffstat (limited to 'nixos/modules/services/system/localtime.nix')
-rw-r--r-- | nixos/modules/services/system/localtime.nix | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/nixos/modules/services/system/localtime.nix b/nixos/modules/services/system/localtime.nix index 8f23454af9d..6383e454e76 100644 --- a/nixos/modules/services/system/localtime.nix +++ b/nixos/modules/services/system/localtime.nix @@ -3,30 +3,26 @@ with lib; let - cfg = config.services.localtime; + cfg = config.services.localtimed; in { options = { - services.localtime = { + services.localtimed = { enable = mkOption { type = types.bool; default = false; description = '' - Enable <literal>localtime</literal>, simple daemon for keeping the system - timezone up-to-date based on the current location. It uses geoclue2 to - determine the current location and systemd-timedated to actually set - the timezone. + Enable <literal>localtimed</literal>, a simple daemon for keeping the + system timezone up-to-date based on the current location. It uses + geoclue2 to determine the current location. ''; }; }; }; config = mkIf cfg.enable { - services.geoclue2 = { - enable = true; - appConfig.localtime = { - isAllowed = true; - isSystem = true; - }; + services.geoclue2.appConfig.localtimed = { + isAllowed = true; + isSystem = true; }; # Install the polkit rules. @@ -34,16 +30,6 @@ in { # Install the systemd unit. systemd.packages = [ pkgs.localtime ]; - users.users.localtimed = { - description = "localtime daemon"; - isSystemUser = true; - group = "localtimed"; - }; - users.groups.localtimed = {}; - - systemd.services.localtime = { - wantedBy = [ "multi-user.target" ]; - serviceConfig.Restart = "on-failure"; - }; + systemd.services.localtime.wantedBy = [ "multi-user.target" ]; }; } |