forked from DGNum/infrastructure
39 lines
999 B
Nix
39 lines
999 B
Nix
{ config, ... }:
|
|
let
|
|
svc = config.system.service;
|
|
in
|
|
{
|
|
services.int = svc.bridge.primary.build {
|
|
ifname = "int";
|
|
macAddressFromInterface = config.hardware.networkInterfaces.lan;
|
|
};
|
|
|
|
services.bridge = svc.bridge.members.build {
|
|
primary = config.services.int;
|
|
members = {
|
|
lan.member = config.hardware.networkInterfaces.lan;
|
|
wlan0 = {
|
|
member = config.hardware.networkInterfaces.wlan0;
|
|
# Bridge only once hostapd is ready.
|
|
dependencies = [ config.services.hostap-1-ready ];
|
|
};
|
|
wlan1 = {
|
|
member = config.hardware.networkInterfaces.wlan1;
|
|
# Bridge only once hostapd is ready.
|
|
dependencies = [ config.services.hostap-2-ready ];
|
|
};
|
|
};
|
|
};
|
|
|
|
# Default VLAN
|
|
# services.vlan-apro = svc.vlan.build {
|
|
# vlanId = 0;
|
|
# interface = config.services.int;
|
|
# };
|
|
|
|
# # Administration VLAN
|
|
# services.vlan-admin = svc.vlan.build {
|
|
# vlan = 3001;
|
|
# interface = config.services.int;
|
|
# };
|
|
}
|