diff options
author | Karel Kočí <cynerd@email.cz> | 2023-01-27 15:12:06 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2023-01-27 15:12:06 +0100 |
commit | 7ad7623287c6492540c2ca55dd167f35e120e55c (patch) | |
tree | 8444d3b96008fc9506ae9f1b2e64d14938341146 /nixos/routers | |
parent | 8e6e3d387a6f9f622f1d84c444924d61069f7af3 (diff) | |
download | nixos-personal-7ad7623287c6492540c2ca55dd167f35e120e55c.tar.gz nixos-personal-7ad7623287c6492540c2ca55dd167f35e120e55c.tar.bz2 nixos-personal-7ad7623287c6492540c2ca55dd167f35e120e55c.zip |
nixos/routers/wifi: update to changes in hostapd
Diffstat (limited to 'nixos/routers')
-rw-r--r-- | nixos/routers/wifi-adm.nix | 25 | ||||
-rw-r--r-- | nixos/routers/wifi-spt.nix | 13 |
2 files changed, 14 insertions, 24 deletions
diff --git a/nixos/routers/wifi-adm.nix b/nixos/routers/wifi-adm.nix index df334e5..6d7aee0 100644 --- a/nixos/routers/wifi-adm.nix +++ b/nixos/routers/wifi-adm.nix @@ -29,31 +29,29 @@ in { }; config = mkIf cnf.enable { - networking.wirelessAP = { - enable = true; + services.hostapd = { + countryCode = "CZ"; environmentFile = "/run/secrets/hostapd.env"; interfaces = (optionalAttrs (cnf.ar9287.interface != null) { "${cnf.ar9287.interface}" = - wifiAP.qualcomAtherosAR9287 { + hostapd.qualcomAtherosAR9287 { channel = cnf.ar9287.channel; - } - // { - bssid = "@BSSID_W24_0@"; + bssid = "@BSSID_AR9287_0@"; ssid = "TurrisAdamkovi"; wpa = 2; wpaPassphrase = "@PASS_TURRIS_ADAMKOVI@"; bridge = "brlan"; bss = { "${cnf.ar9287.interface}.nela" = { - bssid = "@BSSID_W24_1@"; + bssid = "@BSSID_AR9287_1@"; ssid = "Nela"; wpa = 2; wpaPassphrase = "@PASS_NELA@"; bridge = "brguest"; }; "${cnf.ar9287.interface}.milan" = { - bssid = "@BSSID_W24_2@"; + bssid = "@BSSID_AR9287_2@"; ssid = "MILAN-AC"; wpa = 2; wpaPassphrase = "@PASS_MILAN_AC@"; @@ -64,26 +62,23 @@ in { }) // (optionalAttrs (cnf.qca988x.interface != null) { "${cnf.qca988x.interface}" = - wifiAP.qualcomAtherosQCA988x { + hostapd.qualcomAtherosQCA988x { channel = cnf.qca988x.channel; - } - // { - bssid = "@BSSID_W5_0@"; - countryCode = "CZ"; + bssid = "@BSSID_AR9287_0@"; ssid = "TurrisAdamkovi5"; wpa = 2; wpaPassphrase = "@PASS_TURRIS_ADAMKOVI@"; bridge = "brlan"; bss = { "${cnf.qca988x.interface}.nela" = { - bssid = "@BSSID_W5_1@"; + bssid = "@BSSID_AR9287_1@"; ssid = "Nela5"; wpa = 2; wpaPassphrase = "@PASS_NELA@"; bridge = "brguest"; }; "${cnf.qca988x.interface}.milan" = { - bssid = "@BSSID_W5_2@"; + bssid = "@BSSID_AR9287_2@"; ssid = "MILAN-AC"; wpa = 2; wpaPassphrase = "@PASS_MILAN_AC@"; diff --git a/nixos/routers/wifi-spt.nix b/nixos/routers/wifi-spt.nix index 1cbb567..a7b2697 100644 --- a/nixos/routers/wifi-spt.nix +++ b/nixos/routers/wifi-spt.nix @@ -29,16 +29,14 @@ in { }; config = mkIf cnf.enable { - networking.wirelessAP = { - enable = true; + services.hostapd = { + countryCode = "CZ"; environmentFile = "/run/secrets/hostapd.env"; interfaces = (optionalAttrs (cnf.ar9287.interface != null) { "${cnf.ar9287.interface}" = - wifiAP.qualcomAtherosAR9287 { + hostapd.qualcomAtherosAR9287 { channel = cnf.ar9287.channel; - } - // { bssid = "@BSSID_AR9287_0@"; ssid = "TurrisRules"; wpa = 2; @@ -57,12 +55,9 @@ in { }) // (optionalAttrs (cnf.qca988x.interface != null) { "${cnf.qca988x.interface}" = - wifiAP.qualcomAtherosQCA988x { + hostapd.qualcomAtherosQCA988x { channel = cnf.qca988x.channel; - } - // { bssid = "@BSSID_QCA988X_0@"; - countryCode = "CZ"; ssid = "TurrisRules5"; wpa = 2; wpaPassphrase = "@PASS_TURRIS_RULES@"; |