summary refs log tree commit diff
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2020-03-28 12:06:54 +0300
committerDoron Behar <doron.behar@gmail.com>2020-03-28 12:06:54 +0300
commit480397693ef6e9ca92ab6e1d015e31232d62f2c7 (patch)
tree474beee3c1f75779dad0634012f454f03ec8a5dc
parentb03bf779aee312b610b1596682963b7569468630 (diff)
downloadnixpkgs-480397693ef6e9ca92ab6e1d015e31232d62f2c7.tar
nixpkgs-480397693ef6e9ca92ab6e1d015e31232d62f2c7.tar.gz
nixpkgs-480397693ef6e9ca92ab6e1d015e31232d62f2c7.tar.bz2
nixpkgs-480397693ef6e9ca92ab6e1d015e31232d62f2c7.tar.lz
nixpkgs-480397693ef6e9ca92ab6e1d015e31232d62f2c7.tar.xz
nixpkgs-480397693ef6e9ca92ab6e1d015e31232d62f2c7.tar.zst
nixpkgs-480397693ef6e9ca92ab6e1d015e31232d62f2c7.zip
nixos/connman: add option to use specific package
-rw-r--r--nixos/modules/services/networking/connman.nix15
1 files changed, 11 insertions, 4 deletions
diff --git a/nixos/modules/services/networking/connman.nix b/nixos/modules/services/networking/connman.nix
index e8eadc4e187..53adc337fa4 100644
--- a/nixos/modules/services/networking/connman.nix
+++ b/nixos/modules/services/networking/connman.nix
@@ -77,6 +77,13 @@ in {
         '';
       };
 
+      package = mkOption {
+        type = types.path;
+        description = "The connman package / build flavor";
+        default = connman;
+        example = literalExample "pkgs.connmanFull";
+      };
+
     };
 
   };
@@ -93,7 +100,7 @@ in {
       message = "You can not use services.connman with networking.networkmanager";
     }];
 
-    environment.systemPackages = [ connman ];
+    environment.systemPackages = [ cfg.package ];
 
     systemd.services.connman = {
       description = "Connection service";
@@ -105,7 +112,7 @@ in {
         BusName = "net.connman";
         Restart = "on-failure";
         ExecStart = toString ([
-          "${pkgs.connman}/sbin/connmand"
+          "${cfg.package}/sbin/connmand"
           "--config=${configFile}"
           "--nodaemon"
         ] ++ optional enableIwd "--wifi=iwd_agent"
@@ -122,7 +129,7 @@ in {
       serviceConfig = {
         Type = "dbus";
         BusName = "net.connman.vpn";
-        ExecStart = "${pkgs.connman}/sbin/connman-vpnd -n";
+        ExecStart = "${cfg.package}/sbin/connman-vpnd -n";
         StandardOutput = "null";
       };
     };
@@ -132,7 +139,7 @@ in {
       serviceConfig = {
         Name = "net.connman.vpn";
         before = [ "connman" ];
-        ExecStart = "${pkgs.connman}/sbin/connman-vpnd -n";
+        ExecStart = "${cfg.package}/sbin/connman-vpnd -n";
         User = "root";
         SystemdService = "connman-vpn.service";
       };