From 7b8d9700e1f298ea3441297a46eba62ddd2f671f Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Fri, 30 Nov 2018 18:46:04 -0600 Subject: [PATCH] nixos/chrony: don't emit initstepslew when servers is empty Setting the server list to be empty is useful e.g. for hardware-only or virtualized reference clocks that are passed through to the system directly. In this case, initstepslew has no effect, so don't emit it. Signed-off-by: Austin Seipp --- nixos/modules/services/networking/chrony.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/chrony.nix b/nixos/modules/services/networking/chrony.nix index 9b8005e706a..89ab899a1ed 100644 --- a/nixos/modules/services/networking/chrony.nix +++ b/nixos/modules/services/networking/chrony.nix @@ -12,7 +12,7 @@ let ${concatMapStringsSep "\n" (server: "server " + server) cfg.servers} ${optionalString - cfg.initstepslew.enabled + (cfg.initstepslew.enabled && (cfg.servers != [])) "initstepslew ${toString cfg.initstepslew.threshold} ${concatStringsSep " " cfg.initstepslew.servers}" }