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

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
Raito Bezarius 2024-02-19 01:37:30 +01:00
parent a893c0dc4c
commit 985f982435

View file

@ -58,6 +58,7 @@ in rec {
../modules/ssh ../modules/ssh
../modules/ntp ../modules/ntp
../modules/vlan ../modules/vlan
../modules/bridge
]; ];
hostname = "zyxel"; 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 = services.dhcpv4 =
let iface = config.hardware.networkInterfaces.lan; let iface = services.int;
in svc.network.dhcp.client.build { interface = iface; }; in svc.network.dhcp.client.build { interface = iface; };
services.defaultroute4 = svc.network.route.build { services.defaultroute4 = svc.network.route.build {