Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 578fb2c5fa93
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c35f7161aae5
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Oct 15, 2019

  1. nixos/networkmanager: allow iwd as Wi-Fi backend

    This introduces an option wifi.backend to the networkmanager module.
    
    Version of 86dea55 for release-19.09.
    worldofpeace committed Oct 15, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    thoughtpolice Austin Seipp
    Copy the full SHA
    dcc4078 View commit details

Commits on Oct 16, 2019

  1. Merge pull request #71207 from worldofpeace/nm-iwd-19.09

    [19.09] nixos/networkmanager: allow iwd as Wi-Fi backend
    worldofpeace authored Oct 16, 2019
    Copy the full SHA
    c35f716 View commit details
Showing with 18 additions and 6 deletions.
  1. +18 −6 nixos/modules/services/networking/networkmanager.nix
24 changes: 18 additions & 6 deletions nixos/modules/services/networking/networkmanager.nix
Original file line number Diff line number Diff line change
@@ -15,12 +15,13 @@ let
networkmanager-openconnect
networkmanager-openvpn
networkmanager-vpnc
wpa_supplicant
];
] ++ optional (!enableIwd) wpa_supplicant;

dynamicHostsEnabled =
cfg.dynamicHosts.enable && cfg.dynamicHosts.hostsDirs != {};

enableIwd = cfg.wifi.backend == "iwd";

# /var/lib/misc is for dnsmasq.leases.
stateDirs = "/var/lib/NetworkManager /var/lib/dhclient /var/lib/misc";

@@ -48,6 +49,7 @@ let
[device]
wifi.scan-rand-mac-address=${if cfg.wifi.scanRandMacAddress then "yes" else "no"}
wifi.backend=${cfg.wifi.backend}
${cfg.extraConfig}
'';
@@ -234,6 +236,15 @@ in {
wifi = {
macAddress = macAddressOpt;

backend = mkOption {
type = types.enum [ "wpa_supplicant" "iwd" ];
default = "wpa_supplicant";
description = ''
Specify the Wi-Fi backend used for the device.
Currently supported are <option>wpa_supplicant</option> or <option>iwd</option> (experimental).
'';
};

powersave = mkOption {
type = types.nullOr types.bool;
default = null;
@@ -509,13 +520,14 @@ in {
useDHCP = false;
# use mkDefault to trigger the assertion about the conflict above
wireless.enable = mkDefault false;
};
} // (mkIf cfg.enableStrongSwan {
networkmanager.packages = [ pkgs.networkmanager_strongswan ];
}) // (mkIf enableIwd {
wireless.iwd.enable = true;
});

security.polkit.extraConfig = polkitConf;

networking.networkmanager.packages =
mkIf cfg.enableStrongSwan [ pkgs.networkmanager_strongswan ];

services.dbus.packages =
optional cfg.enableStrongSwan pkgs.strongswanNM ++ cfg.packages;