diff options
author | adisbladis <adisbladis@gmail.com> | 2020-03-12 14:12:48 +0000 |
---|---|---|
committer | adisbladis <adisbladis@gmail.com> | 2020-03-12 14:44:59 +0000 |
commit | 63c35a9c289f4b49d57b727eaea8d345448e8495 (patch) | |
tree | 4b824b572394633574a390f7d3df2f18ffc30434 /nixos/modules/services | |
parent | b5f53a5b61599fd9e3389e9a2c9d18018d8c927c (diff) | |
download | nixlib-63c35a9c289f4b49d57b727eaea8d345448e8495.tar nixlib-63c35a9c289f4b49d57b727eaea8d345448e8495.tar.gz nixlib-63c35a9c289f4b49d57b727eaea8d345448e8495.tar.bz2 nixlib-63c35a9c289f4b49d57b727eaea8d345448e8495.tar.lz nixlib-63c35a9c289f4b49d57b727eaea8d345448e8495.tar.xz nixlib-63c35a9c289f4b49d57b727eaea8d345448e8495.tar.zst nixlib-63c35a9c289f4b49d57b727eaea8d345448e8495.zip |
services.ntpd: Add extraConfig parameter
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/networking/ntp/ntpd.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/ntp/ntpd.nix b/nixos/modules/services/networking/ntp/ntpd.nix index b5403cb747d0..54ff054d84c7 100644 --- a/nixos/modules/services/networking/ntp/ntpd.nix +++ b/nixos/modules/services/networking/ntp/ntpd.nix @@ -23,6 +23,8 @@ let restrict -6 ::1 ${toString (map (server: "server " + server + " iburst\n") cfg.servers)} + + ${cfg.extraConfig} ''; 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 { type = types.listOf types.str; description = "Extra flags passed to the ntpd command."; |