From ee8f6ac199f50d490fcd8577e541a692931acea5 Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Sun, 6 Apr 2025 15:17:56 +0200 Subject: networking: iot: add 2g band --- config/networking/services/ap.nix | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'config/networking/services') diff --git a/config/networking/services/ap.nix b/config/networking/services/ap.nix index 5771821..ba72650 100644 --- a/config/networking/services/ap.nix +++ b/config/networking/services/ap.nix @@ -22,8 +22,13 @@ ssid = ssids."${bridge}" + lib.optionalString (radio == "wlp5s0" && bridge != "guest") " (2.4GHz)"; bssid = ifaces."${iface}".machines.self.mac; - authentication.mode = "wpa3-sae"; - authentication.saePasswordsFile = "/etc/hostapd/${bridge}.sae"; + authentication = let + secretsDir = "/etc/hostapd"; + in { + mode = "wpa3-sae"; + saePasswordsFile = "${secretsDir}/${bridge}.sae"; + wpaPskFile = "${secretsDir}/${bridge}.psk"; + }; logLevel = 2; # informational messages @@ -108,10 +113,7 @@ in { (perBridgeAC "wan") (perBridgeAC "iot") { - wlp1s0-iot.authentication = { - mode = lib.mkForce "wpa3-sae-transition"; - wpaPskFile = "/etc/hostapd/iot.psk"; - }; + wlp1s0-iot.authentication.mode = lib.mkForce "wpa3-sae-transition"; } ]; }; @@ -128,8 +130,14 @@ in { networks = let perBridgeN = perBridgeCfg "wlp5s0"; in - (perBridgeN "wan") - // (perBridgeN "guest"); + lib.mkMerge [ + (perBridgeN "wan") + (perBridgeN "guest") + (perBridgeN "iot") + { + wlp5s0-iot.authentication.mode = lib.mkForce "wpa2-sha1"; + } + ]; }; }; }; -- cgit v1.2.3