nixos/networkmanager: fix serializing an invalid `wifi.powersave=null` (#438347)

Sandro d85e95da 040371fd

Changed files
+4 -8
nixos
modules
services
networking
+4 -8
nixos/modules/services/networking/networkmanager.nix
···
{
meta = {
-
maintainers = teams.freedesktop.members;
};
###### interface
···
networkmanager.connectionConfig = {
"ethernet.cloned-mac-address" = cfg.ethernet.macAddress;
"wifi.cloned-mac-address" = cfg.wifi.macAddress;
-
"wifi.powersave" =
-
if cfg.wifi.powersave == null then
-
null
-
else if cfg.wifi.powersave then
-
3
-
else
-
2;
};
}
];
···
{
meta = {
+
maintainers = teams.freedesktop.members ++ [
+
lib.maintainers.frontear
+
];
};
###### interface
···
networkmanager.connectionConfig = {
"ethernet.cloned-mac-address" = cfg.ethernet.macAddress;
"wifi.cloned-mac-address" = cfg.wifi.macAddress;
+
"wifi.powersave" = lib.mkIf (cfg.wifi.powersave != null) (if cfg.wifi.powersave then 3 else 2);
};
}
];