From fd2a89b98330f4a06636ef19f34716d68ea7fe71 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 12 Jun 2022 17:07:36 +0200 Subject: [PATCH] nixos/wpa_supplicant: don't log that wpa_supplicant.conf is ignored with `allowAuxiliaryImperativeNetworks = true` The warning is wrong with `allowAuxiliaryImperativeNetworks`[1] being set to `true` because both files are included in this case with `-c` and `-I`. [1] https://nixos.org/manual/nixos/stable/options.html#opt-networking.wireless.allowAuxiliaryImperativeNetworks --- nixos/modules/services/networking/wpa_supplicant.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix index c2e1d37e28b..5a7975ae178 100644 --- a/nixos/modules/services/networking/wpa_supplicant.nix +++ b/nixos/modules/services/networking/wpa_supplicant.nix @@ -114,7 +114,7 @@ let script = '' - ${optionalString configIsGenerated '' + ${optionalString (configIsGenerated && !cfg.allowAuxiliaryImperativeNetworks) '' if [ -f /etc/wpa_supplicant.conf ]; then echo >&2 "<3>/etc/wpa_supplicant.conf present but ignored. Generated ${configFile} is used instead." fi