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.
This commit is contained in:
Florian Klink 2024-03-18 17:20:05 +02:00
parent ebaf43d163
commit 78d8e2ca11

View file

@ -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 {