nixos/ntpd: automagically use pool instead of server

The same heuristic has been used for ntpd-rs
This commit is contained in:
Stefan Frijters
2025-10-12 12:35:04 +02:00
parent a4ce7cac3e
commit 7d531bc865

View File

@@ -23,7 +23,11 @@ let
restrict 127.0.0.1
restrict -6 ::1
${toString (map (server: "server " + server + " iburst\n") cfg.servers)}
${toString (
map (
server: "${if lib.strings.hasInfix "pool" server then "pool" else "server"} " + server + " iburst\n"
) cfg.servers
)}
${cfg.extraConfig}
'';