From e3fce56047ebb9403d212834510c2b4835f5ef37 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Tue, 7 Feb 2017 17:07:20 +0100 Subject: [PATCH 1/2] nixos.chrony: add extraFlags config option --- nixos/modules/services/networking/chrony.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/chrony.nix b/nixos/modules/services/networking/chrony.nix index ff62acff6eb..9741c039cbc 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}"; }; }; From 9293f86bf212fe3f713f45252bcb708803c82c3b Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Tue, 7 Feb 2017 17:59:07 +0100 Subject: [PATCH 2/2] nixos.chrony: remove generatecommandkey option It's deprecated and no longer used. --- nixos/modules/services/networking/chrony.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/modules/services/networking/chrony.nix b/nixos/modules/services/networking/chrony.nix index 9741c039cbc..9bf266b3805 100644 --- a/nixos/modules/services/networking/chrony.nix +++ b/nixos/modules/services/networking/chrony.nix @@ -23,7 +23,6 @@ let driftfile ${stateDir}/chrony.drift keyfile ${keyFile} - generatecommandkey ${optionalString (!config.time.hardwareClockInLocalTime) "rtconutc"}