aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2023-02-14 11:18:16 +0100
committerKarel Kočí <cynerd@email.cz>2023-02-14 11:18:16 +0100
commit96c20c45442702b96722a9c237a1bae68c7bd150 (patch)
tree10a9717c059a49d8d0ad618c72b60ba4377f7460
parent4eb10766c92a9e0a5ac4ca944fffc9209eec7b22 (diff)
downloadnixos-personal-96c20c45442702b96722a9c237a1bae68c7bd150.tar.gz
nixos-personal-96c20c45442702b96722a9c237a1bae68c7bd150.tar.bz2
nixos-personal-96c20c45442702b96722a9c237a1bae68c7bd150.zip
nixos/wifi-adm: assign to bridge explicitly over hostapd
Hostapd manages to break the bridge for some reason. That is stupid but what can we do with it... The issue is that now hostapd can prevent bridge from starting.
-rw-r--r--nixos/routers/wifi-adm.nix19
1 files changed, 13 insertions, 6 deletions
diff --git a/nixos/routers/wifi-adm.nix b/nixos/routers/wifi-adm.nix
index 353b551..f77d9ad 100644
--- a/nixos/routers/wifi-adm.nix
+++ b/nixos/routers/wifi-adm.nix
@@ -40,21 +40,18 @@ in {
ssid = "TurrisAdamkovi";
wpa = 2;
wpaPassphrase = "@PASS_TURRIS_ADAMKOVI@";
- bridge = "brlan";
bss = {
"${cnf.ar9287.interface}.nela" = {
bssid = "@BSSID_AR9287_1@";
ssid = "Nela";
wpa = 2;
wpaPassphrase = "@PASS_NELA@";
- bridge = "brguest";
};
"${cnf.ar9287.interface}.milan" = {
bssid = "@BSSID_AR9287_2@";
ssid = "MILAN-AC";
wpa = 2;
wpaPassphrase = "@PASS_MILAN_AC@";
- bridge = "brguest";
};
};
};
@@ -66,25 +63,35 @@ in {
ssid = "TurrisAdamkovi5";
wpa = 2;
wpaPassphrase = "@PASS_TURRIS_ADAMKOVI@";
- bridge = "brlan";
bss = {
"${cnf.qca988x.interface}.nela" = {
bssid = "@BSSID_AR9287_1@";
ssid = "Nela5";
wpa = 2;
wpaPassphrase = "@PASS_NELA@";
- bridge = "brguest";
};
"${cnf.qca988x.interface}.milan" = {
bssid = "@BSSID_AR9287_2@";
ssid = "MILAN-AC";
wpa = 2;
wpaPassphrase = "@PASS_MILAN_AC@";
- bridge = "brguest";
};
};
};
});
};
+ networking.bridges = {
+ brlan.interfaces = filter (v: v != null) [
+ cnf.ar9287.interface
+ cnf.qca988x.interface
+ ];
+ brguest.interfaces = (optionals (cnf.ar9287.interface != null) [
+ "${cnf.ar9287.interface}.nela"
+ "${cnf.ar9287.interface}.milan"
+ ]) ++ (optionals (cnf.qca988x.interface != null) [
+ "${cnf.qca988x.interface}.nela"
+ "${cnf.qca988x.interface}.milan"
+ ]);
+ };
};
}