diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2017-02-07 21:50:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-07 21:50:58 +0100 |
commit | 626540e32eb9fc09ebcb4e5d24b8844d11a0437b (patch) | |
tree | 04cc7c3675b2504f95cef1cb0e5468300cbd5391 /nixos/modules/services | |
parent | eaba666273c285ec2d3702c8e627a9035683e268 (diff) | |
parent | 9293f86bf212fe3f713f45252bcb708803c82c3b (diff) | |
download | nixlib-626540e32eb9fc09ebcb4e5d24b8844d11a0437b.tar nixlib-626540e32eb9fc09ebcb4e5d24b8844d11a0437b.tar.gz nixlib-626540e32eb9fc09ebcb4e5d24b8844d11a0437b.tar.bz2 nixlib-626540e32eb9fc09ebcb4e5d24b8844d11a0437b.tar.lz nixlib-626540e32eb9fc09ebcb4e5d24b8844d11a0437b.tar.xz nixlib-626540e32eb9fc09ebcb4e5d24b8844d11a0437b.tar.zst nixlib-626540e32eb9fc09ebcb4e5d24b8844d11a0437b.zip |
Merge pull request #22524 from wizeman/u/chrony-impr
nixos.chrony: add extraFlags config option
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/networking/chrony.nix | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/chrony.nix b/nixos/modules/services/networking/chrony.nix index ff62acff6eb8..9bf266b38054 100644 --- a/nixos/modules/services/networking/chrony.nix +++ b/nixos/modules/services/networking/chrony.nix @@ -23,13 +23,14 @@ let driftfile ${stateDir}/chrony.drift keyfile ${keyFile} - generatecommandkey ${optionalString (!config.time.hardwareClockInLocalTime) "rtconutc"} ${cfg.extraConfig} ''; + chronyFlags = "-n -m -u chrony -f ${configFile} ${toString cfg.extraFlags}"; + in { @@ -76,6 +77,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 +131,7 @@ in ''; serviceConfig = - { ExecStart = "${pkgs.chrony}/bin/chronyd -n -m -u chrony -f ${configFile}"; + { ExecStart = "${pkgs.chrony}/bin/chronyd ${chronyFlags}"; }; }; |