Merge pull request #82411 from adisbladis/ntpd-extraconfig
services.ntpd: Add extraConfig parameter
This commit is contained in:
commit
f3adcbd150
@ -23,6 +23,8 @@ let
|
|||||||
restrict -6 ::1
|
restrict -6 ::1
|
||||||
|
|
||||||
${toString (map (server: "server " + server + " iburst\n") cfg.servers)}
|
${toString (map (server: "server " + server + " iburst\n") cfg.servers)}
|
||||||
|
|
||||||
|
${cfg.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ntpFlags = "-c ${configFile} -u ${ntpUser}:nogroup ${toString cfg.extraFlags}";
|
ntpFlags = "-c ${configFile} -u ${ntpUser}:nogroup ${toString cfg.extraFlags}";
|
||||||
@ -81,6 +83,17 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
example = ''
|
||||||
|
fudge 127.127.1.0 stratum 10
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Additional text appended to <filename>ntp.conf</filename>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
extraFlags = mkOption {
|
extraFlags = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
description = "Extra flags passed to the ntpd command.";
|
description = "Extra flags passed to the ntpd command.";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user