From 6faa7ad3fc2fe556324c225bd704fef3a7fb2003 Mon Sep 17 00:00:00 2001 From: Robert Gerus Date: Mon, 27 Dec 2021 04:41:20 +0100 Subject: [PATCH] nixos/kea: fixes for the systemd units Fix a typo in the kea-dhcp-ddns-server unit definition, and add a KEA_LOCKFILE_DIR environment variable without which kea daemons try to access a lockfile under /var/run/kea path, which is prevented by systemd's ProtectSystem (or one of the other Protect*) mechanism. kea-dhcp-ddns-server doesn't react to updates from dhcp4 server at all without it. --- nixos/modules/services/networking/kea.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/kea.nix b/nixos/modules/services/networking/kea.nix index b11402204aec..4da47f575f79 100644 --- a/nixos/modules/services/networking/kea.nix +++ b/nixos/modules/services/networking/kea.nix @@ -236,6 +236,7 @@ in environment = { KEA_PIDFILE_DIR = "/run/kea"; + KEA_LOCKFILE_DIR = "/run/kea"; }; restartTriggers = [ @@ -271,6 +272,7 @@ in environment = { KEA_PIDFILE_DIR = "/run/kea"; + KEA_LOCKFILE_DIR = "/run/kea"; }; restartTriggers = [ @@ -313,6 +315,7 @@ in environment = { KEA_PIDFILE_DIR = "/run/kea"; + KEA_LOCKFILE_DIR = "/run/kea"; }; restartTriggers = [ @@ -353,6 +356,7 @@ in environment = { KEA_PIDFILE_DIR = "/run/kea"; + KEA_LOCKFILE_DIR = "/run/kea"; }; restartTriggers = [ @@ -361,7 +365,7 @@ in serviceConfig = { ExecStart = "${package}/bin/kea-dhcp-ddns -c /etc/kea/dhcp-ddns.conf ${lib.escapeShellArgs cfg.dhcp-ddns.extraArgs}"; - AmbientCapabilites = [ + AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ]; CapabilityBoundingSet = [