diff options
author | Karel Kočí <cynerd@email.cz> | 2023-02-14 11:18:16 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2023-02-14 11:18:16 +0100 |
commit | 96c20c45442702b96722a9c237a1bae68c7bd150 (patch) | |
tree | 10a9717c059a49d8d0ad618c72b60ba4377f7460 /nixos | |
parent | 4eb10766c92a9e0a5ac4ca944fffc9209eec7b22 (diff) | |
download | nixos-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.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/routers/wifi-adm.nix | 19 |
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" + ]); + }; }; } |