connman: new packages ConnMan v1.20 and connman-ui
This commit is contained in:
parent
501008ad6f
commit
7d4d3536f7
|
@ -36,6 +36,7 @@
|
||||||
lovek323 = "Jason O'Conal <jason@oconal.id.au>";
|
lovek323 = "Jason O'Conal <jason@oconal.id.au>";
|
||||||
ludo = "Ludovic Courtès <ludo@gnu.org>";
|
ludo = "Ludovic Courtès <ludo@gnu.org>";
|
||||||
marcweber = "Marc Weber <marco-oweber@gmx.de>";
|
marcweber = "Marc Weber <marco-oweber@gmx.de>";
|
||||||
|
matejc = "Matej Cotman <cotman.matej@gmail.com>";
|
||||||
modulistic = "Pablo Costa <modulistic@gmail.com>";
|
modulistic = "Pablo Costa <modulistic@gmail.com>";
|
||||||
mornfall = "Petr Ročkai <me@mornfall.net>";
|
mornfall = "Petr Ročkai <me@mornfall.net>";
|
||||||
ocharles = "Oliver Charles <ollie@ocharles.org.uk>";
|
ocharles = "Oliver Charles <ollie@ocharles.org.uk>";
|
||||||
|
|
|
@ -197,6 +197,7 @@
|
||||||
minidlna = 91;
|
minidlna = 91;
|
||||||
haproxy = 92;
|
haproxy = 92;
|
||||||
openldap = 93;
|
openldap = 93;
|
||||||
|
connman = 94;
|
||||||
|
|
||||||
# When adding a gid, make sure it doesn't match an existing uid.
|
# When adding a gid, make sure it doesn't match an existing uid.
|
||||||
|
|
||||||
|
|
|
@ -147,6 +147,7 @@
|
||||||
./services/networking/avahi-daemon.nix
|
./services/networking/avahi-daemon.nix
|
||||||
./services/networking/bind.nix
|
./services/networking/bind.nix
|
||||||
./services/networking/bitlbee.nix
|
./services/networking/bitlbee.nix
|
||||||
|
./services/networking/connman.nix
|
||||||
./services/networking/cntlm.nix
|
./services/networking/cntlm.nix
|
||||||
./services/networking/chrony.nix
|
./services/networking/chrony.nix
|
||||||
./services/networking/ddclient.nix
|
./services/networking/ddclient.nix
|
||||||
|
|
|
@ -0,0 +1,92 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
with pkgs.lib;
|
||||||
|
with pkgs;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.networking.connman;
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
###### interface
|
||||||
|
|
||||||
|
options = {
|
||||||
|
|
||||||
|
networking.connman = {
|
||||||
|
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to use ConnMan for managing your network connections.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
assertions = [{
|
||||||
|
assertion = config.networking.useDHCP == false;
|
||||||
|
message = "You can not use services.networking.connman with services.networking.useDHCP";
|
||||||
|
}{
|
||||||
|
assertion = config.networking.wireless.enable == true;
|
||||||
|
message = "You must use services.networking.connman with services.networking.wireless";
|
||||||
|
}{
|
||||||
|
assertion = config.networking.networkmanager.enable == false;
|
||||||
|
message = "You can not use services.networking.connman with services.networking.networkmanager";
|
||||||
|
}];
|
||||||
|
|
||||||
|
environment.systemPackages = [ connman ];
|
||||||
|
|
||||||
|
systemd.services."connman" = {
|
||||||
|
description = "Connection service";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "syslog.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "dbus";
|
||||||
|
BusName = "net.connman";
|
||||||
|
Restart = "on-failure";
|
||||||
|
ExecStart = "${pkgs.connman}/sbin/connmand --nodaemon";
|
||||||
|
StandardOutput = "null";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services."connman-vpn" = {
|
||||||
|
description = "ConnMan VPN service";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "syslog.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "dbus";
|
||||||
|
BusName = "net.connman.vpn";
|
||||||
|
ExecStart = "${pkgs.connman}/sbin/connman-vpnd -n";
|
||||||
|
StandardOutput = "null";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services."net-connman-vpn" = {
|
||||||
|
description = "D-BUS Service";
|
||||||
|
serviceConfig = {
|
||||||
|
Name = "net.connman.vpn";
|
||||||
|
ExecStart = "${pkgs.connman}/sbin/connman-vpnd -n";
|
||||||
|
User = "root";
|
||||||
|
SystemdService = "connman-vpn.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
useDHCP = false;
|
||||||
|
wireless.enable = true;
|
||||||
|
networkmanager.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
powerManagement.resumeCommands = ''
|
||||||
|
systemctl restart connman
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
{ stdenv, fetchgit, autoconf, automake, libtool, pkgconfig, openconnect, file,
|
||||||
|
openvpn, vpnc, glib, dbus, iptables, gnutls, policykit, polkit,
|
||||||
|
wpa_supplicant, readline6, pptp, ppp, tree }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "connman-1.20";
|
||||||
|
src = fetchgit {
|
||||||
|
url = "git://git.kernel.org/pub/scm/network/connman/connman.git";
|
||||||
|
rev = "8047f3d051b32d38ac0b1e78296b482368728ec6";
|
||||||
|
sha256 = "0hb03rzrspgry8z43x8x76vlq1hdq2wggkk7wbidavnqhpmz7dxz";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ autoconf automake libtool pkgconfig openconnect polkit
|
||||||
|
file openvpn vpnc glib dbus iptables gnutls policykit
|
||||||
|
wpa_supplicant readline6 pptp ppp tree ];
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
export WPASUPPLICANT=${wpa_supplicant}/sbin/wpa_supplicant
|
||||||
|
./bootstrap
|
||||||
|
sed -i "s/\/usr\/bin\/file/file/g" ./configure
|
||||||
|
substituteInPlace configure --replace /usr/sbin/pptp ${pptp}/sbin/pptp
|
||||||
|
substituteInPlace configure --replace /usr/sbin/pppd ${ppp}/sbin/pppd
|
||||||
|
'';
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--sysconfdir=\${out}/etc"
|
||||||
|
"--localstatedir=/var"
|
||||||
|
"--with-dbusconfdir=\${out}/etc"
|
||||||
|
"--with-dbusdatadir=\${out}/usr/share"
|
||||||
|
"--disable-maintainer-mode"
|
||||||
|
"--enable-openconnect=builtin"
|
||||||
|
"--with-openconnect=${openconnect}/sbin/openconnect"
|
||||||
|
"--enable-openvpn=builtin"
|
||||||
|
"--with-openvpn=${openvpn}/sbin/openvpn"
|
||||||
|
"--enable-vpnc=builtin"
|
||||||
|
"--with-vpnc=${vpnc}/sbin/vpnc"
|
||||||
|
"--enable-session-policy-local=builtin"
|
||||||
|
"--enable-client"
|
||||||
|
"--enable-bluetooth"
|
||||||
|
"--enable-wifi"
|
||||||
|
"--enable-polkit"
|
||||||
|
"--enable-tools"
|
||||||
|
"--enable-datafiles"
|
||||||
|
"--enable-pptp"
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
cp ./client/connmanctl $out/sbin/connmanctl
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "The ConnMan project provides a daemon for managing internet connections";
|
||||||
|
homepage = "https://connman.net/";
|
||||||
|
maintainers = [ stdenv.lib.maintainers.matejc ];
|
||||||
|
# tested only on linux, might work on others also
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
|
license = stdenv.lib.licenses.gpl2;
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ stdenv, fetchgit, autoconf, automake, libtool, glib, gtk3, dbus, pkgconfig, file, intltool, connman }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "connmanui-b838e640eddb83d296fb6d146ce756066d37c43b";
|
||||||
|
src = fetchgit {
|
||||||
|
url = "git://github.com/tbursztyka/connman-ui.git";
|
||||||
|
rev = "973879df2c4a556e5f49d808a88a6a5faba78c73";
|
||||||
|
sha256 = "11ps52dn0ws978vv00yrymfvv534v1i9qqx5w93191qjcpjrwj6y";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ autoconf automake libtool glib gtk3 dbus pkgconfig file intltool connman ];
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
set -e
|
||||||
|
./autogen.sh
|
||||||
|
sed -i "s/\/usr\/bin\/file/file/g" ./configure
|
||||||
|
'';
|
||||||
|
|
||||||
|
configureScript = "./configure";
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "A full-featured GTK based trayicon UI for ConnMan";
|
||||||
|
homepage = "https://github.com/tbursztyka/connman-ui";
|
||||||
|
maintainers = [ stdenv.lib.maintainers.matejc ];
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
|
license = stdenv.lib.licenses.gpl2;
|
||||||
|
};
|
||||||
|
}
|
|
@ -685,6 +685,10 @@ let
|
||||||
|
|
||||||
conspy = callPackage ../os-specific/linux/conspy {};
|
conspy = callPackage ../os-specific/linux/conspy {};
|
||||||
|
|
||||||
|
connman = callPackage ../tools/networking/connman { };
|
||||||
|
|
||||||
|
connmanui = callPackage ../tools/networking/connmanui { };
|
||||||
|
|
||||||
convertlit = callPackage ../tools/text/convertlit { };
|
convertlit = callPackage ../tools/text/convertlit { };
|
||||||
|
|
||||||
collectd = callPackage ../tools/system/collectd { };
|
collectd = callPackage ../tools/system/collectd { };
|
||||||
|
|
Loading…
Reference in New Issue