2024-12-12 14:41:43 +01:00
|
|
|
# SPDX-FileCopyrightText: 2024 Ryan Lahfa <ryan.lahfa@dgnum.eu>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: EUPL-1.2
|
|
|
|
|
2024-12-07 16:20:53 +01:00
|
|
|
{ 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;
|
|
|
|
# };
|
|
|
|
}
|