diff options
Diffstat (limited to 'nixos')
-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@"; |