Let the tun services depend on /dev/net/tun
This commit is contained in:
parent
d63da5892c
commit
e3c1865067
@ -351,6 +351,8 @@ in
|
||||
|
||||
createTunDevice = i: nameValuePair "${i.name}"
|
||||
{ description = "Virtual Network Interface ${i.name}";
|
||||
requires = [ "dev-net-tun.device" ];
|
||||
after = [ "dev-net-tun.device" ];
|
||||
wantedBy = [ "network.target" "sys-subsystem-net-devices-${i.name}.device" ];
|
||||
serviceConfig =
|
||||
{ Type = "oneshot";
|
||||
@ -407,6 +409,11 @@ in
|
||||
hostname "${config.networking.hostName}"
|
||||
'';
|
||||
|
||||
services.udev.extraRules =
|
||||
''
|
||||
KERNEL=="tun", TAG+="systemd"
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user