nixos/chrony: add option to change state directory

This commit is contained in:
Ctem 2021-01-06 19:40:48 +09:00
parent 2e131e1f45
commit 2aec205bd2
No known key found for this signature in database
GPG key ID: 7F6702F5FC77041B

View file

@ -5,7 +5,7 @@ with lib;
let
cfg = config.services.chrony;
stateDir = "/var/lib/chrony";
stateDir = cfg.directory;
driftFile = "${stateDir}/chrony.drift";
keyFile = "${stateDir}/chrony.keys";
@ -82,6 +82,12 @@ in
'';
};
directory = mkOption {
type = types.str;
default = "/var/lib/chrony";
description = "Directory where chrony state is stored.";
};
extraConfig = mkOption {
type = types.lines;
default = "";