Jump to content

Using bridges under NixOS

From NixOS Wiki
✖︎︎
This article is a deletion candidate. Further information may be found on the related discussion page.

In order to use macvtap bridges in KVM, LXC, Xen or another hypervisor on NixOS, you have to configure your DHCP server to not assign an IP address to that interface.

By default, the DHCP server on NixOS configures every interface with an IP.

Configuration

If you are running dhcpcd, then you have to define a denyInterfaces parameter:

❄︎ configuration.nix
{
  networking.dhcpcd.denyInterfaces = [ "macvtap0@*" ];
}
🟆︎
Tip: In order to affect your NixOS system by your nix-language-specific changes you must first evaluate it:
$ nixos-rebuild switch --sudo


Issue 🚩︎#67966 is relevant for DHCP and bridging.