services.hostapd: convert iwd assertion ito an warning (#445760)
This commit is contained in:
@@ -1334,26 +1334,21 @@ in
|
||||
# we check if wirelessInterfaces is empty as that means all interfaces implicit
|
||||
shouldWarn = wirelessEnabled && (wirelessInterfaces == [ ] || hasInterfaceConflict);
|
||||
in
|
||||
if shouldWarn then
|
||||
[
|
||||
''
|
||||
lib.optional shouldWarn ''
|
||||
Some wireless interface is configured for both for client and access point mode:
|
||||
this is not allowed. Either specify `networking.wireless.interfaces` and exclude
|
||||
those from `services.hostapd.radios` or make sure to not run the `wpa_supplicant`
|
||||
and `hostapd` services simultaneously.
|
||||
''
|
||||
]
|
||||
else
|
||||
[ ];
|
||||
++ lib.optional config.networking.wireless.iwd.enable ''
|
||||
hostapd and iwd do conflict,
|
||||
use `networking.wireless.enable` in combination with `networking.wireless.interfaces` to avoid it.
|
||||
'';
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.radios != { };
|
||||
message = "At least one radio must be configured with hostapd!";
|
||||
}
|
||||
{
|
||||
assertion = !config.networking.wireless.iwd.enable;
|
||||
message = "hostapd and iwd conflict, use `networking.wireless.enable` in combination with `networking.wireless.interfaces`";
|
||||
}
|
||||
]
|
||||
# Radio warnings
|
||||
++ (concatLists (
|
||||
|
||||
Reference in New Issue
Block a user