diff options
author | Kevin Cox <kevincox@kevincox.ca> | 2020-11-03 12:44:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-03 12:44:13 -0500 |
commit | f1153d8a0ad3e97b0022929eed9ecd36bfb5ee75 (patch) | |
tree | 63774636e43d539444965fff1d5796519c97f732 /nixos/modules/services | |
parent | cf2d180a124284ccaaaae60ca928071eec9f0a1d (diff) | |
parent | 48f8b85e1c108aac95d31729024c5869d4e2ce0f (diff) | |
download | nixpkgs-f1153d8a0ad3e97b0022929eed9ecd36bfb5ee75.tar nixpkgs-f1153d8a0ad3e97b0022929eed9ecd36bfb5ee75.tar.gz nixpkgs-f1153d8a0ad3e97b0022929eed9ecd36bfb5ee75.tar.bz2 nixpkgs-f1153d8a0ad3e97b0022929eed9ecd36bfb5ee75.tar.lz nixpkgs-f1153d8a0ad3e97b0022929eed9ecd36bfb5ee75.tar.xz nixpkgs-f1153d8a0ad3e97b0022929eed9ecd36bfb5ee75.tar.zst nixpkgs-f1153d8a0ad3e97b0022929eed9ecd36bfb5ee75.zip |
Merge pull request #102528 from wizeman/u/fix-chrony-perm2
nixos/chrony: fix owner of chrony drift file
Diffstat (limited to 'nixos/modules/services')
-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 -" ]; |