From ee14496ae2777ed24d0ed0292f466b106f9cfb15 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Fri, 30 Nov 2018 18:48:06 -0600 Subject: [PATCH] nixos/dhcpcd: (try to) restart chrony in the exitHook As the comment notes, restarts/exits of dhcpcd generally require restarting the NTP service since, if name resolution fails for a pool of servers, the service might break itself. To be on the safe side, try restarting Chrony in these instances, too. Signed-off-by: Austin Seipp --- nixos/modules/services/networking/dhcpcd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix index efdbca5d52e..c217ccaa405 100644 --- a/nixos/modules/services/networking/dhcpcd.nix +++ b/nixos/modules/services/networking/dhcpcd.nix @@ -71,7 +71,7 @@ let # anything ever again ("couldn't resolve ..., giving up on # it"), so we silently lose time synchronisation. This also # applies to openntpd. - ${config.systemd.package}/bin/systemctl try-reload-or-restart ntpd.service openntpd.service || true + ${config.systemd.package}/bin/systemctl try-reload-or-restart ntpd.service openntpd.service chronyd.service || true fi ${cfg.runHook}