diff options
author | Ricardo M. Correia <rcorreia@wizy.org> | 2020-11-02 21:29:43 +0100 |
---|---|---|
committer | Ricardo M. Correia <rcorreia@wizy.org> | 2020-11-02 21:41:49 +0100 |
commit | 48f8b85e1c108aac95d31729024c5869d4e2ce0f (patch) | |
tree | bc101e034e892a723ae5e6bdd5da4315233ebec8 /nixos/modules/services/networking/ntp | |
parent | f723ed8d693bb8a3dd78367cae833046585bc794 (diff) | |
download | nixpkgs-48f8b85e1c108aac95d31729024c5869d4e2ce0f.tar nixpkgs-48f8b85e1c108aac95d31729024c5869d4e2ce0f.tar.gz nixpkgs-48f8b85e1c108aac95d31729024c5869d4e2ce0f.tar.bz2 nixpkgs-48f8b85e1c108aac95d31729024c5869d4e2ce0f.tar.lz nixpkgs-48f8b85e1c108aac95d31729024c5869d4e2ce0f.tar.xz nixpkgs-48f8b85e1c108aac95d31729024c5869d4e2ce0f.tar.zst nixpkgs-48f8b85e1c108aac95d31729024c5869d4e2ce0f.zip |
nixos/chrony: fix owner of chrony drift file
It had become owned by root due to #97546.
Diffstat (limited to 'nixos/modules/services/networking/ntp')
-rw-r--r-- | nixos/modules/services/networking/ntp/chrony.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/ntp/chrony.nix b/nixos/modules/services/networking/ntp/chrony.nix index 78de50583f3..e6fa48daf46 100644 --- a/nixos/modules/services/networking/ntp/chrony.nix +++ b/nixos/modules/services/networking/ntp/chrony.nix @@ -6,6 +6,7 @@ let cfg = config.services.chrony; stateDir = "/var/lib/chrony"; + driftFile = "${stateDir}/chrony.drift"; keyFile = "${stateDir}/chrony.keys"; configFile = pkgs.writeText "chrony.conf" '' @@ -16,7 +17,7 @@ let "initstepslew ${toString cfg.initstepslew.threshold} ${concatStringsSep " " cfg.servers}" } - driftfile ${stateDir}/chrony.drift + driftfile ${driftFile} keyfile ${keyFile} ${optionalString (!config.time.hardwareClockInLocalTime) "rtconutc"} @@ -95,6 +96,7 @@ in systemd.tmpfiles.rules = [ "d ${stateDir} 0755 chrony chrony - -" + "f ${driftFile} 0640 chrony chrony -" "f ${keyFile} 0640 chrony chrony -" ]; |