lol

nixos/networkmanager: fix serializing an invalid `wifi.powersave=null`

NetworkManager does not define `null` as a valid value for `wifi.powersave`, and while strangely it doesn't seem to report any errors upon encountering it, it's a weird value and shouldn't be here. This is actually very similar to how the module used to work before the refactor in https://github.com/NixOS/nixpkgs/pull/118308 (see this [snippet](https://github.com/NixOS/nixpkgs/pull/118308/files#diff-0a708e7b053cf5df7620b5262936553af2242d2ce9dabde5bbeba221ece0a021L45-L46) from the PR changes).

Ali Rizvi 65a97395 84fddb6f

+1 -7
+1 -7
nixos/modules/services/networking/networkmanager.nix
··· 684 684 networkmanager.connectionConfig = { 685 685 "ethernet.cloned-mac-address" = cfg.ethernet.macAddress; 686 686 "wifi.cloned-mac-address" = cfg.wifi.macAddress; 687 - "wifi.powersave" = 688 - if cfg.wifi.powersave == null then 689 - null 690 - else if cfg.wifi.powersave then 691 - 3 692 - else 693 - 2; 687 + "wifi.powersave" = lib.mkIf (cfg.wifi.powersave != null) (if cfg.wifi.powersave then 3 else 2); 694 688 }; 695 689 } 696 690 ];