Unverified Commit d85e95da authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

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

parents 040371fd 93d55d06
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -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);
        };
      }
    ];