From f98226bc6efedc3f4f29c1a9974d68e1aded7758 Mon Sep 17 00:00:00 2001 From: kurogeek Date: Fri, 18 Sep 2026 09:36:07 +0000 Subject: [PATCH] router/wifi: assert no supplicant/NetworkManager owns the radios With the AP-typed match, the station-mode netdev is unmanaged until hostapd flips it, so any wpa_supplicant/iwd/NetworkManager in the importing config would grab the radio first and keep resetting it to managed mode under hostapd. Fail at eval instead of at runtime. --- modules/clan/router/wifi.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/clan/router/wifi.nix b/modules/clan/router/wifi.nix index fe8e2cf..6ab5ffe 100644 --- a/modules/clan/router/wifi.nix +++ b/modules/clan/router/wifi.nix @@ -120,6 +120,13 @@ in ); message = "router: wifi.radios..macAddress is required for radios broadcasting more than one network."; } + { + assertion = + !config.networking.wireless.enable + && !config.networking.wireless.iwd.enable + && !config.networking.networkmanager.enable; + message = "router: wifi.enable needs the radios for hostapd; disable networking.wireless (wpa_supplicant), iwd and NetworkManager."; + } ]; # Regulatory database for the kernel, so countryCode actually applies.