From 78d8e2ca119e4019415006ac5ea553e62c8e70c4 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 18 Mar 2024 17:20:05 +0200 Subject: [PATCH] nixos/timesyncd: further document services.timesyncd.servers Running systemd-timesyncd with an empty list of timeservers to sync from does not work. In case an empty list is configured here, systemd will fall back to its compiled-in defaults, which NixOS sets to `{0..4}.nixos.pool.ntp.org`, as per https://github.com/systemd/systemd/blob/main/docs/DISTRO_PORTING.md#ntp-pool This has caused some confusion. Explicitly document this, and describe how to disable timesyncd. --- nixos/modules/system/boot/timesyncd.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/modules/system/boot/timesyncd.nix b/nixos/modules/system/boot/timesyncd.nix index 2666e4cd6b28..ef17c1481abb 100644 --- a/nixos/modules/system/boot/timesyncd.nix +++ b/nixos/modules/system/boot/timesyncd.nix @@ -21,6 +21,9 @@ with lib; type = types.listOf types.str; description = lib.mdDoc '' The set of NTP servers from which to synchronise. + Note if this is set to an empty list, the defaults systemd itself is + compiled with ({0..4}.nixos.pool.ntp.org) apply, + In case you want to disable timesyncd altogether, use the `enable` option. ''; }; extraConfig = mkOption {