From 0e62d0a78abce5aa68c1c8f4940b2e44788606b9 Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Tue, 14 Jan 2025 16:20:17 +0800 Subject: [PATCH] Fix GRE tunnels restarted before udev service started This patch adds explicit requirements for network addresses services to run after and only when udevd service is running. Also depend on virt netdev creation service instead of device Signed-off-by: Egor Savkin --- nixbld-etc-nixos/configuration.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nixbld-etc-nixos/configuration.nix b/nixbld-etc-nixos/configuration.nix index 05dbd28..68eea5b 100644 --- a/nixbld-etc-nixos/configuration.nix +++ b/nixbld-etc-nixos/configuration.nix @@ -358,6 +358,15 @@ in }; }; + systemd.services."network-addresses-${netifUSA}" = { + after = pkgs.lib.mkOverride 1 [ "network-pre.target" "${netifUSA}-netdev.service" "systemd-udevd.service" ]; + requires = [ "systemd-udevd.service" ]; + }; + systemd.services."network-addresses-${netifAlt}" = { + after = pkgs.lib.mkOverride 1 [ "network-pre.target" "${netifAlt}-netdev.service" "systemd-udevd.service" ]; + requires = [ "systemd-udevd.service" ]; + }; + # https://kb.isc.org/docs/dnssec-key-and-signing-policy # chown named.named /etc/nixos/named services.bind = {