examples/nwa50ax-ap: support bridge between lan and ethernet

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
pull/10/head
Raito Bezarius 2024-02-19 01:37:30 +01:00
parent a893c0dc4c
commit 985f982435
1 changed files with 15 additions and 1 deletions

View File

@ -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 {