containers: deny networkmanager from managing the ve-* and vb-* NICs
Without this, when you've enabled networkmanager and start a nixos-container the container will briefly have its specified IP address but then networkmanager starts managing it causing the IP address to be dropped.
This commit is contained in:
parent
875eaf0821
commit
5572de75a0
@ -726,6 +726,11 @@ in
|
||||
|
||||
networking.dhcpcd.denyInterfaces = [ "ve-*" "vb-*" ];
|
||||
|
||||
services.udev.extraRules = optionalString config.networking.networkmanager.enable ''
|
||||
# Don't manage interfaces created by nixos-container.
|
||||
ENV{INTERFACE}=="v[e,b]-*", ENV{NM_UNMANAGED}="1"
|
||||
'';
|
||||
|
||||
environment.systemPackages = [ pkgs.nixos-container ];
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user