From 51d18215095368b5ec7fb701987d4428df609467 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 6 Nov 2019 20:32:54 +0100 Subject: nixos/dhcpcd: restart dhcpcd if exit hook changed This change ensures that `dhcpcd.service` is restarted as soon as the exit hook changes. I use this hook to do additional configuration for my network (like setting a route via the given gateway to my WireGuard) and when changing parts of this exit hook I'd expect to get this activated when switching to my new configuration. --- nixos/modules/services/networking/dhcpcd.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix index 7b278603455..b4f9e3d702a 100644 --- a/nixos/modules/services/networking/dhcpcd.nix +++ b/nixos/modules/services/networking/dhcpcd.nix @@ -165,6 +165,8 @@ in before = [ "network-online.target" ]; after = [ "systemd-udev-settle.service" ]; + restartTriggers = [ exitHook ]; + # Stopping dhcpcd during a reconfiguration is undesirable # because it brings down the network interfaces configured by # dhcpcd. So do a "systemctl restart" instead. -- cgit 1.4.1