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 localtime, 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 localtimed, 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" ];
};
}
diff --git a/pkgs/tools/system/localtime/default.nix b/pkgs/tools/system/localtime/default.nix
index b1f05cb1851..b8f2b460528 100644
--- a/pkgs/tools/system/localtime/default.nix
+++ b/pkgs/tools/system/localtime/default.nix
@@ -1,6 +1,5 @@
{ buildGoModule
, fetchFromGitHub
-, geoclue2-with-demo-agent
, lib
, m4
}:
@@ -18,11 +17,6 @@ buildGoModule {
vendorSha256 = "sha256-12JnEU41sp9qRP07p502EYogveE+aNdfmLwlDRbIdxU=";
- postPatch = ''
- demoPath="${geoclue2-with-demo-agent}/libexec/geoclue-2.0/demos/agent"
- sed -i localtimed.go -e "s#/usr/lib/geoclue-2.0/demos/agent#$demoPath#"
- '';
-
nativeBuildInputs = [ m4 ];
installPhase = ''