From e3fce56047ebb9403d212834510c2b4835f5ef37 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Tue, 7 Feb 2017 17:07:20 +0100 Subject: nixos.chrony: add extraFlags config option --- nixos/modules/services/networking/chrony.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'nixos') 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 chrony.conf ''; }; + + 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}"; }; }; -- cgit 1.4.1