1
0

configure hostapds in gateway profile

This commit is contained in:
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,20 +52,16 @@ 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 {
services.hostap5 = svc.hostapd.build {
interface = config.hardware.networkInterfaces.wlan5; interface = config.hardware.networkInterfaces.wlan5;
params = rec {
ssid = "${secrets.ssid}5"; ssid = "${secrets.ssid}5";
hw_mode="a"; hw_mode="a";
channel = 36; channel = 36;
@ -81,6 +72,7 @@ in rec {
ieee80211ac = 1; ieee80211ac = 1;
} // wirelessConfig; } // wirelessConfig;
}; };
};
services.ntp = svc.ntp.build { services.ntp = svc.ntp.build {
pools = { "pool.ntp.org" = ["iburst"]; }; pools = { "pool.ntp.org" = ["iburst"]; };

View File

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