nixos/chrony: fix owner of chrony drift file
It had become owned by root due to #97546.
This commit is contained in:
parent
f723ed8d69
commit
48f8b85e1c
@ -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…
x
Reference in New Issue
Block a user