From a39e417c587ac1fce8c9095b0f64c43d790f087f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 16 Jun 2015 21:05:44 +0200 Subject: switch across all wired interfaces --- bragi.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/bragi.nix b/bragi.nix index 2fc1aa57..8e7c3e57 100644 --- a/bragi.nix +++ b/bragi.nix @@ -159,20 +159,27 @@ ''; networking.interfaces = { - "enp1s0" = { + "wired" = { useDHCP = false; ipAddress = "10.141.4.1"; prefixLength = 24; }; }; + networking.bridges."wired" = { + interfaces = [ "enp1s0" + "enp2s0" + "enp3s0" + ]; + }; + networking.nat = { enable = true; externalIP = "10.141.1.5"; externalInterface = "wlp4s0"; internalIPs = [ "10.141.4.0/24" ]; - internalInterfaces = [ "enp1s0" + internalInterfaces = [ "wired" ]; }; @@ -187,7 +194,7 @@ services.dhcpd = { enable = true; - interfaces = "enp1s0"; + interfaces = "wired"; extraConfig = '' option subnet-mask 255.255.255.0; option broadcast-address 10.141.1.1; -- cgit v1.2.3