From 985f982435ce35a70b07fb1ca101d9ff8f822861 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Mon, 19 Feb 2024 01:37:30 +0100 Subject: [PATCH] examples/nwa50ax-ap: support bridge between lan and ethernet Signed-off-by: Raito Bezarius --- examples/nwa50ax-ap.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/examples/nwa50ax-ap.nix b/examples/nwa50ax-ap.nix index e121d8a..6a3989a 100644 --- 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 {