+7
nixos/modules/system/boot/timesyncd.nix
+7
nixos/modules/system/boot/timesyncd.nix
···+# systemd-timesyncd disables DNSSEC validation in the nss-resolve module by setting SYSTEMD_NSS_RESOLVE_VALIDATE to 0 in the unit file.+# This is required in order to solve the chicken-and-egg problem when DNSSEC validation needs the correct time to work, but to set the+# correct time, we need to connect to an NTP server, which usually requires resolving its hostname.+# In order for nss-resolve to be able to read this environment variable we patch systemd-timesyncd to disable NSCD and use NSS modules directly.+# This means that systemd-timesyncd needs to have NSS modules path in LD_LIBRARY_PATH. When systemd-resolved is disabled we still need to set+# NSS module path so that systemd-timesyncd keeps using other NSS modules that are configured in the system.
+1
nixos/tests/all-tests.nix
+1
nixos/tests/all-tests.nix
···
+61
nixos/tests/systemd-timesyncd-nscd-dnssec.nix
+61
nixos/tests/systemd-timesyncd-nscd-dnssec.nix
···+# This test verifies that systemd-timesyncd can resolve the NTP server hostname when DNSSEC validation+# fails even though it is enforced in the systemd-resolved settings. It is required in order to solve+# the chicken-and-egg problem when DNSSEC validation needs the correct time to work, but to set the+# correct time, we need to connect to an NTP server, which usually requires resolving its hostname.+# - Sets up a DNS server (tinydns) listening on the eth1 ip addess, serving .ntp and fake.ntp records.+# Here, we don't expect systemd-timesyncd to connect and synchronize time because there is no NTP+# The debug output is necessary to determine whether systemd-timesyncd successfully resolves our NTP hostname or not+machine.wait_until_succeeds("journalctl -u systemd-timesyncd.service --grep='Resolved address ${ntpIP}:123 for ${ntpHostname}'")
+46
pkgs/os-specific/linux/systemd/0020-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch
+46
pkgs/os-specific/linux/systemd/0020-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch
···
+1
pkgs/os-specific/linux/systemd/default.nix
+1
pkgs/os-specific/linux/systemd/default.nix
···