rename wlan services for devices with > 1 radio

let's standardise on having 2.4GHz radio be "wlan", and
5GHz as "wlan5"
This commit is contained in:
Daniel Barlow 2023-10-07 22:23:44 +01:00
parent caf8e85061
commit a896c4e31c
2 changed files with 7 additions and 5 deletions

View file

@ -123,11 +123,11 @@
in { in {
lan = link.build { ifname = "eth0"; }; lan = link.build { ifname = "eth0"; };
wan = link.build { ifname = "eth1"; }; wan = link.build { ifname = "eth1"; };
wlan_24 = link.build { wlan = link.build {
ifname = "wlan0"; ifname = "wlan0";
dependencies = [ mac80211 ]; dependencies = [ mac80211 ];
}; };
wlan_5 = link.build { wlan5 = link.build {
ifname = "wlan1"; ifname = "wlan1";
dependencies = [ mac80211 ath10k_cal_data ]; dependencies = [ mac80211 ath10k_cal_data ];
}; };

View file

@ -49,7 +49,7 @@ in rec {
hostname = "rotuer"; hostname = "rotuer";
services.hostap = svc.hostapd.build { services.hostap = svc.hostapd.build {
interface = config.hardware.networkInterfaces.wlan_24; interface = config.hardware.networkInterfaces.wlan;
params = { params = {
ssid = "liminix"; ssid = "liminix";
hw_mode="g"; hw_mode="g";
@ -59,7 +59,7 @@ in rec {
}; };
services.hostap5 = svc.hostapd.build { services.hostap5 = svc.hostapd.build {
interface = config.hardware.networkInterfaces.wlan_5; interface = config.hardware.networkInterfaces.wlan5;
params = rec { params = rec {
ssid = "liminix_5"; ssid = "liminix_5";
hw_mode="a"; hw_mode="a";
@ -79,7 +79,9 @@ in rec {
services.bridge = svc.bridge.members.build { services.bridge = svc.bridge.members.build {
primary = services.int; primary = services.int;
members = with config.hardware.networkInterfaces; members = with config.hardware.networkInterfaces;
[ wlan_24 wlan_5 lan ]; [ wlan
wlan5
lan ];
}; };
services.ntp = svc.ntp.build { services.ntp = svc.ntp.build {