commit 985f982435ce35a70b07fb1ca101d9ff8f822861 parent a893c0dc4c0956f5b9b4db025bfc641362ad95a2 Author: Raito Bezarius <masterancpp@gmail.com> Date: Mon, 19 Feb 2024 01:37:30 +0100 examples/nwa50ax-ap: support bridge between lan and ethernet Signed-off-by: Raito Bezarius <masterancpp@gmail.com> Diffstat:
| M | examples/nwa50ax-ap.nix | | | 16 | +++++++++++++++- |
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/examples/nwa50ax-ap.nix b/examples/nwa50ax-ap.nix @@ -58,6 +58,7 @@ in rec { ../modules/ssh ../modules/ntp ../modules/vlan + ../modules/bridge ]; hostname = "zyxel"; @@ -73,8 +74,21 @@ in rec { ]; }; + services.int = svc.bridge.primary.build { + ifname = "int"; + }; + + services.bridge = svc.bridge.members.build { + primary = services.int; + members = with config.hardware.networkInterfaces; [ + lan + wlan0 + wlan1 + ]; + }; + services.dhcpv4 = - let iface = config.hardware.networkInterfaces.lan; + let iface = services.int; in svc.network.dhcp.client.build { interface = iface; }; services.defaultroute4 = svc.network.route.build {