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 <es@m-labs.hk>
This commit is contained in:
Egor Savkin 2024-10-30 17:23:40 +08:00
parent 4f8d84e3ef
commit b1779b57cc
1 changed files with 8 additions and 0 deletions

View File

@ -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 = {