diff --git a/modules/system/wifi.nix b/modules/system/wifi.nix index 8f03de4..6ea0433 100644 --- a/modules/system/wifi.nix +++ b/modules/system/wifi.nix @@ -33,17 +33,17 @@ in { config = mkMerge [ - (mkIf (cfg.system == "wpa_supplicant") { + (mkIf (cfg.enable && cfg.system == "wpa_supplicant") { networking.wireless.enable = true; networking.wireless.interfaces = cfg.interfaces; }) - (mkIf (cfg.system == "networkmanager") { + (mkIf (cfg.enable && cfg.system == "networkmanager") { networking.networkmanager.enable = true; networking.networkmanager.wifi.powersave = true; }) - (mkIf (cfg.configurationFile != null) { + (mkIf (cfg.enable && cfg.configurationFile != null) { environment.etc."wpa_supplicant.conf".source = cfg.configurationFile; })