From 622e983ee88cf683e60b031326263d649260471a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 10 Jul 2024 12:09:58 +0200 Subject: nixos: tweak the wifi to fix functionality --- flake.lock | 18 +++++----- nixos/configurations/adm-omnia2.nix | 4 +-- nixos/modules/wifi-spt.nix | 72 ++++++++++++++++++------------------- 3 files changed, 47 insertions(+), 47 deletions(-) diff --git a/flake.lock b/flake.lock index 9f1b87c..68c966e 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1718371084, - "narHash": "sha256-abpBi61mg0g+lFFU0zY4C6oP6fBwPzbHPKBGw676xsA=", + "lastModified": 1720546205, + "narHash": "sha256-boCXsjYVxDviyzoEyAk624600f3ZBo/DKtUdvMTpbGY=", "owner": "ryantm", "repo": "agenix", - "rev": "3a56735779db467538fb2e577eda28a9daacaca6", + "rev": "de96bd907d5fbc3b14fc33ad37d1b9a3cb15edc6", "type": "github" }, "original": { @@ -274,11 +274,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1720429258, - "narHash": "sha256-d6JI5IgJ1xdrk7DvYVx7y8ijcYz5I1nhCwOiDP6cq00=", + "lastModified": 1720515935, + "narHash": "sha256-8b+fzR4W2hI5axwB+4nBwoA15awPKkck4ghhCt8v39M=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "72d3c007024ce47d838bb38693c8773812f54bf2", + "rev": "a111ce6b537df12a39874aa9672caa87f8677eda", "type": "github" }, "original": { @@ -332,11 +332,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1720501375, - "narHash": "sha256-+uhyVoqSWA3+dQAeeWwovRmoD9eeqCWaAnpOuuqalNk=", + "lastModified": 1720585496, + "narHash": "sha256-UONPcQR2r0voopd6pcNFmUv7p4TJPeAXzwnqWmaPujw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bb1588c3045cfdc18154cb45a2f2186122cbbad8", + "rev": "e01511309fe8b0432aa58a547365e51d5a3ecf85", "type": "github" }, "original": { diff --git a/nixos/configurations/adm-omnia2.nix b/nixos/configurations/adm-omnia2.nix index 2848bd9..45b8dc4 100644 --- a/nixos/configurations/adm-omnia2.nix +++ b/nixos/configurations/adm-omnia2.nix @@ -14,12 +14,12 @@ wifiAP.adm = { enable = true; ar9287 = { - interface = "wlp1s0"; + interface = "wlp2s0"; bssids = ["12:f0:21:23:2b:00" "12:f0:21:23:2b:01" "12:f0:21:23:2b:02"]; channel = 11; }; qca988x = { - interface = "wlp2s0"; + interface = "wlp1s0"; bssids = ["12:f0:21:23:2b:03" "12:f0:21:23:2b:04" "12:f0:21:23:2b:05"]; channel = 36; }; diff --git a/nixos/modules/wifi-spt.nix b/nixos/modules/wifi-spt.nix index 2ecc3a3..a74440d 100644 --- a/nixos/modules/wifi-spt.nix +++ b/nixos/modules/wifi-spt.nix @@ -61,14 +61,14 @@ in { wpa_key_mgmt = mkForce "WPA-PSK"; # force use without sha256 }; }; - #"${cnf.ar9287.interface}.guest" = { - # bssid = elemAt cnf.ar9287.bssids 1; - # ssid = "Kocovi"; - # authentication = { - # mode = "wpa2-sha256"; - # wpaPasswordFile = "/run/secrets/hostapd-Kocovi.pass"; - # }; - #}; + "${cnf.ar9287.interface}.guest" = { + bssid = elemAt cnf.ar9287.bssids 1; + ssid = "Kocovi"; + authentication = { + mode = "wpa2-sha256"; + wpaPasswordFile = "/run/secrets/hostapd-Kocovi.pass"; + }; + }; }; }; }) @@ -107,14 +107,14 @@ in { wpa_key_mgmt = mkForce "WPA-PSK"; # force use without sha256 }; }; - #"${cnf.qca988x.interface}.guest" = { - # bssid = elemAt cnf.qca988x.bssids 1; - # ssid = "Kocovi"; - # authentication = { - # mode = "wpa2-sha256"; - # wpaPasswordFile = "/run/secrets/hostapd-Kocovi.pass"; - # }; - #}; + "${cnf.qca988x.interface}.guest" = { + bssid = elemAt cnf.qca988x.bssids 1; + ssid = "Kocovi"; + authentication = { + mode = "wpa2-sha256"; + wpaPasswordFile = "/run/secrets/hostapd-Kocovi.pass"; + }; + }; }; }; }) @@ -135,16 +135,16 @@ in { } ]; }; - #"lan-${cnf.ar9287.interface}-guest" = { - # matchConfig.Name = "${cnf.ar9287.interface}.guest"; - # networkConfig.Bridge = "brlan"; - # bridgeVLANs = [ - # { - # EgressUntagged = 2; - # PVID = 2; - # } - # ]; - #}; + "lan-${cnf.ar9287.interface}-guest" = { + matchConfig.Name = "${cnf.ar9287.interface}.guest"; + networkConfig.Bridge = "brlan"; + bridgeVLANs = [ + { + EgressUntagged = 2; + PVID = 2; + } + ]; + }; }) (mkIf (cnf.qca988x.interface != null) { "lan-${cnf.qca988x.interface}" = { @@ -160,16 +160,16 @@ in { } ]; }; - #"lan-${cnf.qca988x.interface}-guest" = { - # matchConfig.Name = "${cnf.qca988x.interface}.guest"; - # networkConfig.Bridge = "brlan"; - # bridgeVLANs = [ - # { - # EgressUntagged = 2; - # PVID = 2; - # } - # ]; - #}; + "lan-${cnf.qca988x.interface}-guest" = { + matchConfig.Name = "${cnf.qca988x.interface}.guest"; + networkConfig.Bridge = "brlan"; + bridgeVLANs = [ + { + EgressUntagged = 2; + PVID = 2; + } + ]; + }; }) ]; }; -- cgit v1.2.3