Working bridge configuration using systemd-networkd

This commit is contained in:
JuliusFreudenberger 2025-08-12 00:39:41 +02:00
parent c790a14db1
commit 7bce6df38b

View file

@ -36,16 +36,39 @@
services.proxmox-ve = { services.proxmox-ve = {
enable = true; enable = true;
ipAddress = "192.168.122.42"; ipAddress = "192.168.122.71";
# Make vmbr0 bridge visible in Proxmox web interface # Make vmbr0 bridge visible in Proxmox web interface
bridges = [ "vmbr0" ]; bridges = [ "vmbr0" ];
}; };
# Actually set up the vmbr0 bridge networking.useDHCP = false;
networking = {
bridges.vmbr0.interfaces = [ "enp1s0" ]; systemd.network = {
interfaces.vmbr0.useDHCP = lib.mkDefault true; enable = true;
networks."10-lan" = {
matchConfig.Name = [ "enp1s0" ];
networkConfig = {
Bridge = "vmbr0";
};
};
netdevs."vmbr0" = {
netdevConfig = {
Name = "vmbr0";
Kind = "bridge";
};
};
networks."10-lan-bridge" = {
matchConfig.Name = "vmbr0";
networkConfig = {
IPv6AcceptRA = true;
DHCP = "ipv4";
};
linkConfig.RequiredForOnline = "routable";
};
}; };
# This option defines the first version of NixOS you have installed on this particular machine, # This option defines the first version of NixOS you have installed on this particular machine,