summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquentin@aristote.fr <quentin@aristote.fr>2025-04-06 15:17:56 +0200
committerquentin@aristote.fr <quentin@aristote.fr>2025-04-06 15:17:56 +0200
commitee8f6ac199f50d490fcd8577e541a692931acea5 (patch)
tree894513a80cfd71683253abd70665b9c12e73f6fd
parent2df6abdde91689cc3f52d2f15e74be13e72d8023 (diff)
networking: iot: add 2g band
-rw-r--r--config/networking/default.nix10
-rw-r--r--config/networking/services/ap.nix24
2 files changed, 25 insertions, 9 deletions
diff --git a/config/networking/default.nix b/config/networking/default.nix
index fb8dafe..0c56861 100644
--- a/config/networking/default.nix
+++ b/config/networking/default.nix
@@ -65,6 +65,11 @@ in {
machines.self.mac = "02:f0:21:b6:11:fc";
bridges = ["iot"];
};
+ wlp5s0-iot = {
+ device = "wlp5s0";
+ machines.self.mac = "02:f0:21:b2:61:09";
+ bridges = ["iot"];
+ };
wlp5s0-guest = {
device = "wlp5s0";
machines.self.mac = "06:f0:21:b2:61:09";
@@ -87,7 +92,10 @@ in {
};
};
iot = {
- interfaces = ["wlp1s0-iot"];
+ interfaces = [
+ "wlp1s0-iot"
+ "wlp5s0-iot"
+ ];
subnet = {
prefix = "192.168.3";
prefixLength = 24;
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";
+ }
+ ];
};
};
};