fix: misbehaving wifi module

This commit is contained in:
Ingolf Wagner 2020-03-11 15:37:54 +08:00
parent e953fab0b1
commit 58b24565ee
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -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;
})