From 71ea6a9a41f1340e6821812f8b7e331072dbd020 Mon Sep 17 00:00:00 2001 From: Bob Rubbens Date: Sat, 25 Jul 2020 14:15:20 +0200 Subject: [PATCH] nixos/wpa_supplicant: update config generation Ensure wpa_supplicant.conf is also generated when userControlled and extraConfig are used. (As discussed in issue #59959) --- 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 a7dea95056a0..08a17d20ed7f 100644 --- a/nixos/modules/services/networking/wpa_supplicant.nix +++ b/nixos/modules/services/networking/wpa_supplicant.nix @@ -4,7 +4,7 @@ with lib; let cfg = config.networking.wireless; - configFile = if cfg.networks != {} then pkgs.writeText "wpa_supplicant.conf" '' + configFile = if cfg.networks != {} || cfg.extraConfig != "" || cfg.userControlled.enable then pkgs.writeText "wpa_supplicant.conf" '' ${optionalString cfg.userControlled.enable '' ctrl_interface=DIR=/run/wpa_supplicant GROUP=${cfg.userControlled.group} update_config=1''}