From 4822155d49fba8bd8adec7212b6c71517b60e10e Mon Sep 17 00:00:00 2001 From: Craig Hall Date: Sat, 20 Jun 2020 17:12:52 +0100 Subject: [PATCH 1/3] nixos/hostapd: Remove blank default for cfg.interface Leaving this blank leads to a confusing error about systemd unit dependencies. --- nixos/modules/services/networking/hostapd.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/modules/services/networking/hostapd.nix b/nixos/modules/services/networking/hostapd.nix index 5d73038363a9..0a26c466bb0e 100644 --- a/nixos/modules/services/networking/hostapd.nix +++ b/nixos/modules/services/networking/hostapd.nix @@ -66,7 +66,6 @@ in }; interface = mkOption { - default = ""; example = "wlp2s0"; description = '' The interfaces hostapd will use. From 8b7740d1b2fc6f9e89bf405ba090e5931a8e8546 Mon Sep 17 00:00:00 2001 From: Craig Hall Date: Sat, 20 Jun 2020 17:14:42 +0100 Subject: [PATCH 2/3] nixos/hostapd: Disable insecure TKIP by default It's possible that setting wpa=2 disables TKIP anyway, but on my machine I could not get 802.11n to work without setting rsn_pairwise=CCMP. N.B. rsn_pairwise takes its default from wpa_pairwise. --- nixos/modules/services/networking/hostapd.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/networking/hostapd.nix b/nixos/modules/services/networking/hostapd.nix index 0a26c466bb0e..b1abf88b0d99 100644 --- a/nixos/modules/services/networking/hostapd.nix +++ b/nixos/modules/services/networking/hostapd.nix @@ -34,6 +34,7 @@ let ${optionalString cfg.wpa '' wpa=2 + wpa_pairwise=CCMP wpa_passphrase=${cfg.wpaPassphrase} ''} ${optionalString cfg.noScan "noscan=1"} From 5d012c4bb21fa9bee9f34339f95ef8fffa052d56 Mon Sep 17 00:00:00 2001 From: Craig Hall Date: Sat, 20 Jun 2020 17:29:26 +0100 Subject: [PATCH 3/3] nixos/hostapd: Enable 802.11n / 802.11ac by default --- nixos/modules/services/networking/hostapd.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/networking/hostapd.nix b/nixos/modules/services/networking/hostapd.nix index b1abf88b0d99..01a1b298cda6 100644 --- a/nixos/modules/services/networking/hostapd.nix +++ b/nixos/modules/services/networking/hostapd.nix @@ -20,6 +20,8 @@ let ssid=${cfg.ssid} hw_mode=${cfg.hwMode} channel=${toString cfg.channel} + ieee80211n=1 + ieee80211ac=1 ${optionalString (cfg.countryCode != null) ''country_code=${cfg.countryCode}''} ${optionalString (cfg.countryCode != null) ''ieee80211d=1''}