summary refs log tree commit diff
path: root/nixos/modules/services/networking/kea.nix
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2021-07-28 23:22:50 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2021-07-30 03:25:11 +0200
commit3d43cf8f210632818963160d2df01fc64c76769a (patch)
treec6e47703415f4d54e91b4c16214e02e1e4f93506 /nixos/modules/services/networking/kea.nix
parent3cc3160fe6cb3b85ac9b8f77b4c5d3b68f9c2962 (diff)
downloadnixpkgs-3d43cf8f210632818963160d2df01fc64c76769a.tar
nixpkgs-3d43cf8f210632818963160d2df01fc64c76769a.tar.gz
nixpkgs-3d43cf8f210632818963160d2df01fc64c76769a.tar.bz2
nixpkgs-3d43cf8f210632818963160d2df01fc64c76769a.tar.lz
nixpkgs-3d43cf8f210632818963160d2df01fc64c76769a.tar.xz
nixpkgs-3d43cf8f210632818963160d2df01fc64c76769a.tar.zst
nixpkgs-3d43cf8f210632818963160d2df01fc64c76769a.zip
nixos/kea: fix config reload
Because the config file gets symlinked to /etc/kea to make reloads work
we need to add restart triggers for the actual symlink targets.
Diffstat (limited to 'nixos/modules/services/networking/kea.nix')
-rw-r--r--nixos/modules/services/networking/kea.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/kea.nix b/nixos/modules/services/networking/kea.nix
index 72773b83a49..b11402204ae 100644
--- a/nixos/modules/services/networking/kea.nix
+++ b/nixos/modules/services/networking/kea.nix
@@ -238,6 +238,10 @@ in
         KEA_PIDFILE_DIR = "/run/kea";
       };
 
+      restartTriggers = [
+        ctrlAgentConfig
+      ];
+
       serviceConfig = {
         ExecStart = "${package}/bin/kea-ctrl-agent -c /etc/kea/ctrl-agent.conf ${lib.escapeShellArgs cfg.dhcp4.extraArgs}";
         KillMode = "process";
@@ -269,6 +273,10 @@ in
         KEA_PIDFILE_DIR = "/run/kea";
       };
 
+      restartTriggers = [
+        dhcp4Config
+      ];
+
       serviceConfig = {
         ExecStart = "${package}/bin/kea-dhcp4 -c /etc/kea/dhcp4-server.conf ${lib.escapeShellArgs cfg.dhcp4.extraArgs}";
         # Kea does not request capabilities by itself
@@ -307,6 +315,10 @@ in
         KEA_PIDFILE_DIR = "/run/kea";
       };
 
+      restartTriggers = [
+        dhcp6Config
+      ];
+
       serviceConfig = {
         ExecStart = "${package}/bin/kea-dhcp6 -c /etc/kea/dhcp6-server.conf ${lib.escapeShellArgs cfg.dhcp6.extraArgs}";
         # Kea does not request capabilities by itself
@@ -343,6 +355,10 @@ in
         KEA_PIDFILE_DIR = "/run/kea";
       };
 
+      restartTriggers = [
+        dhcpDdnsConfig
+      ];
+
       serviceConfig = {
         ExecStart = "${package}/bin/kea-dhcp-ddns -c /etc/kea/dhcp-ddns.conf ${lib.escapeShellArgs cfg.dhcp-ddns.extraArgs}";
         AmbientCapabilites = [