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

This commit is contained in:
Sandro
2025-09-10 15:04:35 +02:00
committed by GitHub

View File

@@ -144,7 +144,9 @@ in
{
meta = {
maintainers = teams.freedesktop.members;
maintainers = teams.freedesktop.members ++ [
lib.maintainers.frontear
];
};
###### interface
@@ -684,13 +686,7 @@ in
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;
"wifi.powersave" = lib.mkIf (cfg.wifi.powersave != null) (if cfg.wifi.powersave then 3 else 2);
};
}
];