configure hostapds in gateway profile

gateway-profile
Daniel Barlow 2024-03-18 19:52:37 +00:00
parent 0b61c0b318
commit 5dd595a209
2 changed files with 21 additions and 29 deletions

View File

@ -18,11 +18,6 @@ let
wirelessConfig = { wirelessConfig = {
country_code = "GB"; country_code = "GB";
inherit (secrets) wpa_passphrase; inherit (secrets) wpa_passphrase;
auth_algs = 1; # 1=wpa2, 2=wep, 3=both
wpa = 2; # 1=wpa, 2=wpa2, 3=both
wpa_key_mgmt = "WPA-PSK";
wpa_pairwise = "TKIP CCMP"; # auth for wpa (may not need this?)
rsn_pairwise = "CCMP"; # auth for wpa2
wmm_enabled = 1; wmm_enabled = 1;
}; };
@ -57,29 +52,26 @@ in rec {
family = "inet"; address ="${secrets.lan.prefix}.1"; prefixLength = 24; family = "inet"; address ="${secrets.lan.prefix}.1"; prefixLength = 24;
}; };
}; };
}; wireless.networks = {
services.hostap = svc.hostapd.build { telent = {
interface = config.hardware.networkInterfaces.wlan; interface = config.hardware.networkInterfaces.wlan;
params = { ssid = secrets.ssid;
ssid = secrets.ssid; hw_mode="g";
hw_mode="g"; channel = "2";
channel = "2"; ieee80211n = 1;
ieee80211n = 1; } // wirelessConfig;
} // wirelessConfig; telent5 = rec {
}; interface = config.hardware.networkInterfaces.wlan5;
ssid = "${secrets.ssid}5";
services.hostap5 = svc.hostapd.build { hw_mode="a";
interface = config.hardware.networkInterfaces.wlan5; channel = 36;
params = rec { ht_capab = "[HT40+]";
ssid = "${secrets.ssid}5"; vht_oper_chwidth = 1;
hw_mode="a"; vht_oper_centr_freq_seg0_idx = channel + 6;
channel = 36; ieee80211n = 1;
ht_capab = "[HT40+]"; ieee80211ac = 1;
vht_oper_chwidth = 1; } // wirelessConfig;
vht_oper_centr_freq_seg0_idx = channel + 6; };
ieee80211n = 1;
ieee80211ac = 1;
} // wirelessConfig;
}; };
services.ntp = svc.ntp.build { services.ntp = svc.ntp.build {

View File

@ -52,7 +52,7 @@ in {
../bridge ../bridge
../ntp ../ntp
../ssh ../ssh
# { config.services = hostaps; } { config.services = hostaps; }
]; ];