nixos/connman: add option to use specific package

+11 -4
+11 -4
nixos/modules/services/networking/connman.nix
··· 77 77 ''; 78 78 }; 79 79 80 + package = mkOption { 81 + type = types.path; 82 + description = "The connman package / build flavor"; 83 + default = connman; 84 + example = literalExample "pkgs.connmanFull"; 85 + }; 86 + 80 87 }; 81 88 82 89 }; ··· 93 100 message = "You can not use services.connman with networking.networkmanager"; 94 101 }]; 95 102 96 - environment.systemPackages = [ connman ]; 103 + environment.systemPackages = [ cfg.package ]; 97 104 98 105 systemd.services.connman = { 99 106 description = "Connection service"; ··· 105 112 BusName = "net.connman"; 106 113 Restart = "on-failure"; 107 114 ExecStart = toString ([ 108 - "${pkgs.connman}/sbin/connmand" 115 + "${cfg.package}/sbin/connmand" 109 116 "--config=${configFile}" 110 117 "--nodaemon" 111 118 ] ++ optional enableIwd "--wifi=iwd_agent" ··· 122 129 serviceConfig = { 123 130 Type = "dbus"; 124 131 BusName = "net.connman.vpn"; 125 - ExecStart = "${pkgs.connman}/sbin/connman-vpnd -n"; 132 + ExecStart = "${cfg.package}/sbin/connman-vpnd -n"; 126 133 StandardOutput = "null"; 127 134 }; 128 135 }; ··· 132 139 serviceConfig = { 133 140 Name = "net.connman.vpn"; 134 141 before = [ "connman" ]; 135 - ExecStart = "${pkgs.connman}/sbin/connman-vpnd -n"; 142 + ExecStart = "${cfg.package}/sbin/connman-vpnd -n"; 136 143 User = "root"; 137 144 SystemdService = "connman-vpn.service"; 138 145 };