diff options
author | Karel Kočí <cynerd@email.cz> | 2024-03-16 14:12:11 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2024-03-16 14:12:11 +0100 |
commit | 7cd40525ff19d9adb6a7540e16a27c955cb1c517 (patch) | |
tree | f65f918ed8f713e13f50296beff119b0eaedfd6f /2024-installfest/wifi-guest.nix | |
parent | 64af010c19bae50d19f6626d4138355b2971159e (diff) | |
download | presentations-7cd40525ff19d9adb6a7540e16a27c955cb1c517.tar.gz presentations-7cd40525ff19d9adb6a7540e16a27c955cb1c517.tar.bz2 presentations-7cd40525ff19d9adb6a7540e16a27c955cb1c517.zip |
Add presentation from Installfest 2024
Diffstat (limited to '2024-installfest/wifi-guest.nix')
-rw-r--r-- | 2024-installfest/wifi-guest.nix | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/2024-installfest/wifi-guest.nix b/2024-installfest/wifi-guest.nix new file mode 100644 index 0000000..46c5817 --- /dev/null +++ b/2024-installfest/wifi-guest.nix @@ -0,0 +1,114 @@ +{lib, ...}: { + nixpkgs.config.allowUnfree = true; + hardware.enableAllFirmware = true; + boot.extraModprobeConfig = '' + options cfg80211 ieee80211_regdom="CZ" + ''; + services.hostapd = { + enable = true; + radios = { + "wlp3s0" = { + channel = 7; + countryCode = "CZ"; + wifi4 = { + enable = true; + inherit (lib.hostapd.qualcomAtherosAR9287.wifi4) capabilities; + }; + networks = { + "wlp3s0" = { + ssid = "NixOSInstallFest"; + bssid = "12:f0:21:23:2b:00"; + authentication = { + mode = "wpa2-sha256"; + wpaPassword = "InstallFest2024"; + }; + }; + "wlp3s0.guest" = { + ssid = "NixOSInstallFest-guest"; + bssid = "12:f0:21:23:2b:01"; + authentication.mode = "none"; + }; + }; + }; + "wlp2s0" = { + channel = 36; + band = "5g"; + countryCode = "CZ"; + wifi4 = { + enable = true; + inherit (lib.hostapd.qualcomAtherosQCA988x.wifi4) capabilities; + }; + wifi5 = { + enable = true; + inherit (lib.hostapd.qualcomAtherosQCA988x.wifi5) capabilities; + }; + networks = { + "wlp2s0" = { + ssid = "NixOSInstallFest5"; + bssid = "12:f0:21:23:2b:02"; + authentication = { + mode = "wpa2-sha256"; + wpaPassword = "InstallFest2024"; + }; + }; + "wlp2s0.guest" = { + ssid = "NixOSInstallFest-guest"; + bssid = "12:f0:21:23:2b:03"; + authentication.mode = "none"; + }; + }; + }; + }; + }; + + systemd.network.networks = { + "lan-wlp3s0" = { + matchConfig.Name = "wlp3s0"; + networkConfig.Bridge = "brlan"; + bridgeVLANs = [ + { + bridgeVLANConfig = { + EgressUntagged = 1; + PVID = 1; + }; + } + ]; + }; + "lan-wlp3s0.guest" = { + matchConfig.Name = "wlp3s0.guest"; + networkConfig.Bridge = "brlan"; + bridgeVLANs = [ + { + bridgeVLANConfig = { + EgressUntagged = 2; + PVID = 2; + }; + } + ]; + }; + "lan-wlp2s0" = { + matchConfig.Name = "wlp2s0"; + networkConfig.Bridge = "brlan"; + bridgeVLANs = [ + { + bridgeVLANConfig = { + EgressUntagged = 1; + PVID = 1; + }; + } + ]; + }; + "lan-wlp2s0.guest" = { + matchConfig.Name = "wlp2s0.guest"; + networkConfig.Bridge = "brlan"; + bridgeVLANs = [ + { + bridgeVLANConfig = { + EgressUntagged = 2; + PVID = 2; + }; + } + ]; + }; + }; +} |