Unverified Commit 4fa107f1 authored by rnhmjoj's avatar rnhmjoj
Browse files

nixos/wireless: create empty config for imperative setup

If allowAuxiliaryImperativeNetworks is enabled, the wpa_supplicant
daemon complains fails to start if /etc/wpa_supplicant.conf does not
exist. As this can be created using wpa_cli (or similar) later, it
shouldn't matter, so let's create an empty one.

This fixes issues #157537, #299466.
parent e5e8e068
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -124,6 +124,11 @@ let
          fi
        ''}

        # ensure wpa_supplicant.conf exists, or the daemon will fail to start
        ${optionalString cfg.allowAuxiliaryImperativeNetworks ''
          touch /etc/wpa_supplicant.conf
        ''}

        # substitute environment variables
        if [ -f "${configFile}" ]; then
          ${pkgs.gawk}/bin/awk '{