connman: improved configuration support
This commit is contained in:
parent
54e430a689
commit
095bf185ec
@ -5,7 +5,12 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.networking.connman;
|
cfg = config.networking.connman;
|
||||||
|
configFile = pkgs.writeText "connman.conf" ''
|
||||||
|
[General]
|
||||||
|
NetworkInterfaceBlacklist=${concatStringsSep "," cfg.networkInterfaceBlacklist}
|
||||||
|
|
||||||
|
${cfg.extraConfig}
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
|
|
||||||
###### interface
|
###### interface
|
||||||
@ -22,6 +27,23 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = ''
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Configuration lines appended to the generated connman configuration file.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
networkInterfaceBlacklist = mkOption {
|
||||||
|
type = with types; listOf string;
|
||||||
|
default = [ "vmnet" "vboxnet" "virbr" "ifb" "ve" ];
|
||||||
|
description = ''
|
||||||
|
Default blacklisted interfaces, this includes NixOS containers interfaces (ve).
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -51,7 +73,7 @@ in {
|
|||||||
Type = "dbus";
|
Type = "dbus";
|
||||||
BusName = "net.connman";
|
BusName = "net.connman";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
ExecStart = "${pkgs.connman}/sbin/connmand --nodaemon";
|
ExecStart = "${pkgs.connman}/sbin/connmand --config=${configFile} --nodaemon";
|
||||||
StandardOutput = "null";
|
StandardOutput = "null";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user