diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2019-11-06 20:32:54 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2019-11-06 20:49:22 +0100 |
commit | 51d18215095368b5ec7fb701987d4428df609467 (patch) | |
tree | c3dff37fbf2ab4e9076e33633438af5d8f7e20e7 /nixos/modules/services | |
parent | 20ef52bf043860a45f17e28f9cb9aa90ec482a1d (diff) | |
download | nixlib-51d18215095368b5ec7fb701987d4428df609467.tar nixlib-51d18215095368b5ec7fb701987d4428df609467.tar.gz nixlib-51d18215095368b5ec7fb701987d4428df609467.tar.bz2 nixlib-51d18215095368b5ec7fb701987d4428df609467.tar.lz nixlib-51d18215095368b5ec7fb701987d4428df609467.tar.xz nixlib-51d18215095368b5ec7fb701987d4428df609467.tar.zst nixlib-51d18215095368b5ec7fb701987d4428df609467.zip |
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.
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/networking/dhcpcd.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix index 7b2786034552..b4f9e3d702a2 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. |