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.
This commit is contained in:
rnhmjoj 2024-04-21 02:05:12 +02:00
parent e5e8e0688f
commit 4fa107f1c9
No known key found for this signature in database
GPG Key ID: BFBAF4C975F76450
1 changed files with 5 additions and 0 deletions

View File

@ -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 '{