From a9bebbe3a0397ab192d6df707d665790fd80a9b6 Mon Sep 17 00:00:00 2001 From: Astro Date: Mon, 13 Nov 2023 23:14:16 +0100 Subject: [PATCH] nixos-module/container/dhcp-server: just set Restart for kea-*-server.service --- nix/nixos-module/container/dhcp-server.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/nix/nixos-module/container/dhcp-server.nix b/nix/nixos-module/container/dhcp-server.nix index aa5ff07..5f336a9 100644 --- a/nix/nixos-module/container/dhcp-server.nix +++ b/nix/nixos-module/container/dhcp-server.nix @@ -277,9 +277,17 @@ in }; }; - # Hotfix weird ddns service behaviour - systemd.services.kea-dhcp-ddns-server.after = [ - "systemd.services.kea-dhcp4-server.service" - "systemd.services.kea-dhcp6-server.service" - ]; + # Increase reliablity + # (mostly for kea-dhcp-ddns-server.service) + systemd.services = + let + restartService.serviceConfig = { + RestartSec = 4; + Restart = "always"; + }; + in { + kea-dhcp4-server = restartService; + kea-dhcp6-server = restartService; + kea-dhcp-ddns-server = restartService; + }; }