spacepaste

  1.  
  2. diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix
  3. index 2d76e0676b2..79ddb5f7968 100644
  4. --- a/nixos/modules/services/networking/networkmanager.nix
  5. +++ b/nixos/modules/services/networking/networkmanager.nix
  6. @@ -34,6 +34,8 @@ let
  7. [device]
  8. wifi.scan-rand-mac-address=${if cfg.wifi.scanRandMacAddress then "yes" else "no"}
  9. + ${optionalString (cfg.wifi.backend != null)
  10. + ''wifi.backend=${cfg.wifi.backend}''}
  11. ${cfg.extraConfig}
  12. '';
  13. @@ -139,7 +141,7 @@ in {
  14. # Ugly hack for using the correct gnome3 packageSet
  15. basePackages = mkOption {
  16. type = types.attrsOf types.package;
  17. - default = { inherit networkmanager modemmanager wpa_supplicant
  18. + default = { inherit networkmanager modemmanager
  19. networkmanager-openvpn networkmanager-vpnc
  20. networkmanager-openconnect networkmanager-fortisslvpn
  21. networkmanager-l2tp networkmanager-iodine; };
  22. @@ -194,6 +196,12 @@ in {
  23. wifi = {
  24. macAddress = macAddressOpt;
  25. + backend = mkOption {
  26. + type = types.enum ["wpa_supplicant" "iwd"];
  27. + default = "wpa_supplicant";
  28. + description = "WiFi Backend to be used by NetworkManager";
  29. + };
  30. +
  31. powersave = mkOption {
  32. type = types.nullOr types.bool;
  33. default = null;
  34. @@ -510,7 +518,9 @@ in {
  35. security.polkit.extraConfig = polkitConf;
  36. networking.networkmanager.packages =
  37. - mkIf cfg.enableStrongSwan [ pkgs.networkmanager_strongswan ];
  38. + [ pkgs.${toString cfg.wifi.backend} ] ++
  39. + optional cfg.enableStrongSwan [ pkgs.networkmanager_strongswan ];
  40. + #mkIf cfg.enableStrongSwan [ pkgs.networkmanager_strongswan ];
  41. services.dbus.packages =
  42. optional cfg.enableStrongSwan pkgs.strongswanNM ++ cfg.packages;
  43.