From 7cd40525ff19d9adb6a7540e16a27c955cb1c517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 16 Mar 2024 14:12:11 +0100 Subject: Add presentation from Installfest 2024 --- 2024-installfest/wifi.nix | 58 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 2024-installfest/wifi.nix (limited to '2024-installfest/wifi.nix') diff --git a/2024-installfest/wifi.nix b/2024-installfest/wifi.nix new file mode 100644 index 0000000..ae6531e --- /dev/null +++ b/2024-installfest/wifi.nix @@ -0,0 +1,58 @@ +{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"; + authentication = { + mode = "wpa2-sha256"; + wpaPassword = "InstallFest2024"; + }; + }; + }; + "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"; + authentication = { + mode = "wpa2-sha256"; + wpaPassword = "InstallFest2024"; + }; + }; + }; + }; + }; + + systemd.network.networks = { + "lan-wlp3s0" = { + matchConfig.Name = "wlp3s0"; + networkConfig.Bridge = "brlan"; + }; + "lan-wlp2s0" = { + matchConfig.Name = "wlp2s0"; + networkConfig.Bridge = "brlan"; + }; + }; +} -- cgit v1.2.3