From b1779b57cc40ef6203d16d08979fd2a7985ff92a Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Wed, 30 Oct 2024 17:23:40 +0800 Subject: [PATCH] Break cycle dependency of tunnel netdev services on network setup This changes the following chain after nixos-rebuild switch with modified tunnel interfaces: stop network-setup -> stop TUN-netdev -> stop network-addresses-TUN -> start network-addresses-TUN (fails since it depends on TUN-netdev which is off). Chain after this change: stop TUN-netdev -> stop network-setup -> stop network-addresses-TUN -> start TUN-netdev -> start network-addresses-TUN -> start network-setup Signed-off-by: Egor Savkin --- nixbld-etc-nixos/configuration.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nixbld-etc-nixos/configuration.nix b/nixbld-etc-nixos/configuration.nix index 1c749ce5..db8d9fc3 100644 --- a/nixbld-etc-nixos/configuration.nix +++ b/nixbld-etc-nixos/configuration.nix @@ -358,6 +358,14 @@ in }; }; + # Break cycle dependency making netdev service stop when network-setup is stopped + systemd.services."${netifAlt}-netdev" = { + partOf = pkgs.lib.mkOverride 1 [ ]; + }; + systemd.services."${netifUSA}-netdev" = { + partOf = pkgs.lib.mkOverride 1 [ ]; + }; + # https://kb.isc.org/docs/dnssec-key-and-signing-policy # chown named.named /etc/nixos/named services.bind = {