nixos/chrony: split the initstepslew attrset into options

Add explicit options for initstepslew.enabled and initstepslew.threshold, rather
than using an attrset.
This commit is contained in:
Ben Wolsieffer
2021-01-31 18:48:15 -05:00
parent ac6ac61e3f
commit 6f4e6cd819

View File

@@ -81,19 +81,28 @@ in
''; '';
}; };
initstepslew = mkOption { initstepslew = {
type = types.attrsOf (types.either types.bool types.int); enabled = mkOption {
default = { type = types.bool;
enabled = true; default = true;
threshold = 1000; # by default, same threshold as 'ntpd -g' (1000s)
};
description = '' description = ''
Allow chronyd to make a rapid measurement of the system clock error at Allow chronyd to make a rapid measurement of the system clock error
boot time, and to correct the system clock by stepping before normal at boot time, and to correct the system clock by stepping before
operation begins. normal operation begins.
''; '';
}; };
threshold = mkOption {
type = types.either types.float types.int;
default = 1000; # by default, same threshold as 'ntpd -g' (1000s)
description = ''
The threshold of system clock error (in seconds) above which the
clock will be stepped. If the correction required is less than the
threshold, a slew is used instead.
'';
};
};
directory = mkOption { directory = mkOption {
type = types.str; type = types.str;
default = "/var/lib/chrony"; default = "/var/lib/chrony";