Unverified Commit 42093d86 authored by Michele Guerini Rocco's avatar Michele Guerini Rocco Committed by GitHub
Browse files

services.hostapd: convert iwd assertion ito an warning (#445760)

parents 635c544b be8eb7a3
Loading
Loading
Loading
Loading
+10 −15
Original line number Diff line number Diff line
@@ -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 (