mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 21:25:30 +03:00
nixos/systemd: fix TUN networking in LXC containers (#81481)
in LXC container /dev/net/tun is pre-available, "dev-net-tun.device" always fails
This commit is contained in:
parent
8d57f75f7a
commit
7503f280c8
2 changed files with 4 additions and 4 deletions
|
@ -253,8 +253,8 @@ let
|
|||
|
||||
createTunDevice = i: nameValuePair "${i.name}-netdev"
|
||||
{ description = "Virtual Network Interface ${i.name}";
|
||||
bindsTo = [ "dev-net-tun.device" ];
|
||||
after = [ "dev-net-tun.device" "network-pre.target" ];
|
||||
bindsTo = optional (!config.boot.isContainer) "dev-net-tun.device";
|
||||
after = optional (!config.boot.isContainer) "dev-net-tun.device" ++ [ "network-pre.target" ];
|
||||
wantedBy = [ "network-setup.service" (subsystemDevice i.name) ];
|
||||
partOf = [ "network-setup.service" ];
|
||||
before = [ "network-setup.service" ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue