Merge pull request #102528 from wizeman/u/fix-chrony-perm2
nixos/chrony: fix owner of chrony drift file
This commit is contained in:
commit
f1153d8a0a
1 changed files with 3 additions and 1 deletions
|
@ -6,6 +6,7 @@ let
|
||||||
cfg = config.services.chrony;
|
cfg = config.services.chrony;
|
||||||
|
|
||||||
stateDir = "/var/lib/chrony";
|
stateDir = "/var/lib/chrony";
|
||||||
|
driftFile = "${stateDir}/chrony.drift";
|
||||||
keyFile = "${stateDir}/chrony.keys";
|
keyFile = "${stateDir}/chrony.keys";
|
||||||
|
|
||||||
configFile = pkgs.writeText "chrony.conf" ''
|
configFile = pkgs.writeText "chrony.conf" ''
|
||||||
|
@ -16,7 +17,7 @@ let
|
||||||
"initstepslew ${toString cfg.initstepslew.threshold} ${concatStringsSep " " cfg.servers}"
|
"initstepslew ${toString cfg.initstepslew.threshold} ${concatStringsSep " " cfg.servers}"
|
||||||
}
|
}
|
||||||
|
|
||||||
driftfile ${stateDir}/chrony.drift
|
driftfile ${driftFile}
|
||||||
keyfile ${keyFile}
|
keyfile ${keyFile}
|
||||||
|
|
||||||
${optionalString (!config.time.hardwareClockInLocalTime) "rtconutc"}
|
${optionalString (!config.time.hardwareClockInLocalTime) "rtconutc"}
|
||||||
|
@ -95,6 +96,7 @@ in
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d ${stateDir} 0755 chrony chrony - -"
|
"d ${stateDir} 0755 chrony chrony - -"
|
||||||
|
"f ${driftFile} 0640 chrony chrony -"
|
||||||
"f ${keyFile} 0640 chrony chrony -"
|
"f ${keyFile} 0640 chrony chrony -"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue