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: 03212a7f0324
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 129c73802fdd
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Dec 21, 2019

  1. Copy the full SHA
    7753d58 View commit details

Commits on Jan 2, 2020

  1. Merge pull request #76153 from arcnmx/connman-iwd

    nixos/connman: optional iwd backend
    Christian Kauhaus authored Jan 2, 2020

    Partially verified

    This commit is signed with the committer’s verified signature.
    Mic92’s contribution has been verified via GPG key.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    129c738 View commit details
Showing with 26 additions and 6 deletions.
  1. +26 −6 nixos/modules/services/networking/connman.nix
32 changes: 26 additions & 6 deletions nixos/modules/services/networking/connman.nix
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ let
${cfg.extraConfig}
'';
enableIwd = cfg.wifi.backend == "iwd";
in {

imports = [
@@ -56,6 +57,17 @@ in {
'';
};

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

extraFlags = mkOption {
type = with types; listOf str;
default = [ ];
@@ -76,9 +88,6 @@ in {
assertions = [{
assertion = !config.networking.useDHCP;
message = "You can not use services.connman with networking.useDHCP";
}{
assertion = config.networking.wireless.enable;
message = "You must use services.connman with networking.wireless";
}{
assertion = !config.networking.networkmanager.enable;
message = "You can not use services.connman with networking.networkmanager";
@@ -89,12 +98,18 @@ in {
systemd.services.connman = {
description = "Connection service";
wantedBy = [ "multi-user.target" ];
after = [ "syslog.target" ];
after = [ "syslog.target" ] ++ optional enableIwd "iwd.service";
requires = optional enableIwd "iwd.service";
serviceConfig = {
Type = "dbus";
BusName = "net.connman";
Restart = "on-failure";
ExecStart = "${pkgs.connman}/sbin/connmand --config=${configFile} --nodaemon ${toString cfg.extraFlags}";
ExecStart = toString ([
"${pkgs.connman}/sbin/connmand"
"--config=${configFile}"
"--nodaemon"
] ++ optional enableIwd "--wifi=iwd_agent"
++ cfg.extraFlags);
StandardOutput = "null";
};
};
@@ -125,7 +140,12 @@ in {

networking = {
useDHCP = false;
wireless.enable = true;
wireless = {
enable = mkIf (!enableIwd) true;
iwd = mkIf enableIwd {
enable = true;
};
};
networkmanager.enable = false;
};
};