Skip to content

Commit

Permalink
nixos/chrony: split the initstepslew attrset into options
Browse files Browse the repository at this point in the history
Add explicit options for initstepslew.enabled and initstepslew.threshold, rather
than using an attrset.
  • Loading branch information
lopsided98 committed Feb 3, 2021
1 parent ac6ac61 commit 6f4e6cd
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions nixos/modules/services/networking/ntp/chrony.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,26 @@ in
'';
};

initstepslew = mkOption {
type = types.attrsOf (types.either types.bool types.int);
default = {
enabled = true;
threshold = 1000; # by default, same threshold as 'ntpd -g' (1000s)
initstepslew = {
enabled = mkOption {
type = types.bool;
default = true;
description = ''
Allow chronyd to make a rapid measurement of the system clock error
at boot time, and to correct the system clock by stepping before
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.
'';
};
description = ''
Allow chronyd to make a rapid measurement of the system clock error at
boot time, and to correct the system clock by stepping before normal
operation begins.
'';
};

directory = mkOption {
Expand Down

0 comments on commit 6f4e6cd

Please sign in to comment.