nixos/networkmanager: fix serializing an invalid wifi.powersave=null (#438347)
This commit is contained in:
@@ -144,7 +144,9 @@ in
|
|||||||
{
|
{
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
maintainers = teams.freedesktop.members;
|
maintainers = teams.freedesktop.members ++ [
|
||||||
|
lib.maintainers.frontear
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
###### interface
|
###### interface
|
||||||
@@ -684,13 +686,7 @@ in
|
|||||||
networkmanager.connectionConfig = {
|
networkmanager.connectionConfig = {
|
||||||
"ethernet.cloned-mac-address" = cfg.ethernet.macAddress;
|
"ethernet.cloned-mac-address" = cfg.ethernet.macAddress;
|
||||||
"wifi.cloned-mac-address" = cfg.wifi.macAddress;
|
"wifi.cloned-mac-address" = cfg.wifi.macAddress;
|
||||||
"wifi.powersave" =
|
"wifi.powersave" = lib.mkIf (cfg.wifi.powersave != null) (if cfg.wifi.powersave then 3 else 2);
|
||||||
if cfg.wifi.powersave == null then
|
|
||||||
null
|
|
||||||
else if cfg.wifi.powersave then
|
|
||||||
3
|
|
||||||
else
|
|
||||||
2;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user