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 = {
country_code = "GB";
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;
};
@ -57,29 +52,26 @@ in rec {
family = "inet"; address ="${secrets.lan.prefix}.1"; prefixLength = 24;
};
};
};
services.hostap = svc.hostapd.build {
interface = config.hardware.networkInterfaces.wlan;
params = {
ssid = secrets.ssid;
hw_mode="g";
channel = "2";
ieee80211n = 1;
} // wirelessConfig;
};
services.hostap5 = svc.hostapd.build {
interface = config.hardware.networkInterfaces.wlan5;
params = rec {
ssid = "${secrets.ssid}5";
hw_mode="a";
channel = 36;
ht_capab = "[HT40+]";
vht_oper_chwidth = 1;
vht_oper_centr_freq_seg0_idx = channel + 6;
ieee80211n = 1;
ieee80211ac = 1;
} // wirelessConfig;
wireless.networks = {
telent = {
interface = config.hardware.networkInterfaces.wlan;
ssid = secrets.ssid;
hw_mode="g";
channel = "2";
ieee80211n = 1;
} // wirelessConfig;
telent5 = rec {
interface = config.hardware.networkInterfaces.wlan5;
ssid = "${secrets.ssid}5";
hw_mode="a";
channel = 36;
ht_capab = "[HT40+]";
vht_oper_chwidth = 1;
vht_oper_centr_freq_seg0_idx = channel + 6;
ieee80211n = 1;
ieee80211ac = 1;
} // wirelessConfig;
};
};
services.ntp = svc.ntp.build {

View File

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