diff options
author | Bernardo Meurer <bernardo@meurer.org> | 2022-06-01 13:20:16 -0700 |
---|---|---|
committer | Bernardo Meurer <bernardo@meurer.org> | 2022-06-01 13:20:16 -0700 |
commit | ffae8569b01f478dd5e863ccd0ef783a573e3f70 (patch) | |
tree | 0ba89e1f72160fe9fc6ad8379ffaaa68782aa3b2 | |
parent | ccad9f83bcce06c6feaf8d2104a3b114f42555a8 (diff) | |
download | nixpkgs-ffae8569b01f478dd5e863ccd0ef783a573e3f70.tar nixpkgs-ffae8569b01f478dd5e863ccd0ef783a573e3f70.tar.gz nixpkgs-ffae8569b01f478dd5e863ccd0ef783a573e3f70.tar.bz2 nixpkgs-ffae8569b01f478dd5e863ccd0ef783a573e3f70.tar.lz nixpkgs-ffae8569b01f478dd5e863ccd0ef783a573e3f70.tar.xz nixpkgs-ffae8569b01f478dd5e863ccd0ef783a573e3f70.tar.zst nixpkgs-ffae8569b01f478dd5e863ccd0ef783a573e3f70.zip |
nixos/localtimed: hopefully fix geoclue
-rw-r--r-- | nixos/modules/services/system/localtime.nix | 32 | ||||
-rw-r--r-- | pkgs/tools/system/localtime/default.nix | 6 |
2 files changed, 9 insertions, 29 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" ]; }; } 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 = '' |