diff options
author | Ricardo M. Correia <rcorreia@wizy.org> | 2017-02-07 17:07:20 +0100 |
---|---|---|
committer | Ricardo M. Correia <rcorreia@wizy.org> | 2017-02-07 18:01:57 +0100 |
commit | e3fce56047ebb9403d212834510c2b4835f5ef37 (patch) | |
tree | 30d7e7ab8511dacacb9e220f8fa580e19024e24a /nixos | |
parent | 3aff6c07ab2909ba5006d3258d99cb105a45a17b (diff) | |
download | nixlib-e3fce56047ebb9403d212834510c2b4835f5ef37.tar nixlib-e3fce56047ebb9403d212834510c2b4835f5ef37.tar.gz nixlib-e3fce56047ebb9403d212834510c2b4835f5ef37.tar.bz2 nixlib-e3fce56047ebb9403d212834510c2b4835f5ef37.tar.lz nixlib-e3fce56047ebb9403d212834510c2b4835f5ef37.tar.xz nixlib-e3fce56047ebb9403d212834510c2b4835f5ef37.tar.zst nixlib-e3fce56047ebb9403d212834510c2b4835f5ef37.zip |
nixos.chrony: add extraFlags config option
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/networking/chrony.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/chrony.nix b/nixos/modules/services/networking/chrony.nix index ff62acff6eb8..9741c039cbc8 100644 --- a/nixos/modules/services/networking/chrony.nix +++ b/nixos/modules/services/networking/chrony.nix @@ -30,6 +30,8 @@ let ${cfg.extraConfig} ''; + chronyFlags = "-n -m -u chrony -f ${configFile} ${toString cfg.extraFlags}"; + in { @@ -76,6 +78,13 @@ in <literal>chrony.conf</literal> ''; }; + + extraFlags = mkOption { + default = []; + example = [ "-s" ]; + type = types.listOf types.str; + description = "Extra flags passed to the chronyd command."; + }; }; }; @@ -123,7 +132,7 @@ in ''; serviceConfig = - { ExecStart = "${pkgs.chrony}/bin/chronyd -n -m -u chrony -f ${configFile}"; + { ExecStart = "${pkgs.chrony}/bin/chronyd ${chronyFlags}"; }; }; |