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 <aseipp@pobox.com>
This commit is contained in:
Austin Seipp 2018-11-30 18:48:06 -06:00
parent 7b8d9700e1
commit ee14496ae2
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ let
# anything ever again ("couldn't resolve ..., giving up on # anything ever again ("couldn't resolve ..., giving up on
# it"), so we silently lose time synchronisation. This also # it"), so we silently lose time synchronisation. This also
# applies to openntpd. # 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 fi
${cfg.runHook} ${cfg.runHook}