diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index bd4bc37..c4ae827 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -27,38 +27,20 @@ # 192.168.42.5/24 # gw 192.168.42.1 - systemd.network = { - enable = true; - networks = { - "10-lan" = { - matchConfig.Name = [ "eno1np0" ]; - networkConfig = { - Bridge = "vmbr0"; - }; - }; - "alien" = { - matchConfig.Name = [ "eno2np1" ]; - networkConfig = { - address = [ - "192.168.42.5/24" - ]; - }; - linkConfig.RequiredForOnline = "routable"; - }; - "10-lan-bridge" = { - matchConfig.Name = "vmbr0"; - networkConfig = { - IPv6AcceptRA = true; - DHCP = "yes"; - }; - linkConfig.RequiredForOnline = "routable"; - }; + # Configuration for the first interface (e.g., enp1s0) + systemd.network.networks."10-lan" = { + matchConfig.Name = "enp1s0"; # Adjust to your first network interface name + networkConfig = { + Address = "192.168.42.5/24"; + Gateway = "192.168.42.1"; # Optional: Set a gateway if needed }; - netdevs."vmbr0" = { - netdevConfig = { - Name = "vmbr0"; - Kind = "bridge"; - }; + }; + + # Configuration for the second interface (e.g., enp2s0) + systemd.network.networks."20-wan" = { + matchConfig.Name = "enp2s0"; # Adjust to your second network interface name + networkConfig = { + DHCP = "ipv4"; # Enable DHCP for this interface }; };