network-manager: add support for internal DHCP

This commit is contained in:
Peter Hoeg 2017-06-02 19:05:22 +08:00
parent 1fe17ee116
commit a087081ebb

View File

@ -12,6 +12,7 @@ let
configFile = writeText "NetworkManager.conf" ''
[main]
plugins=keyfile
dhcp=${cfg.dhcp}
dns=${if cfg.useDnsmasq then "dnsmasq" else "default"}
[keyfile]
@ -21,7 +22,7 @@ let
''unmanaged-devices=${lib.concatStringsSep ";" cfg.unmanaged}''}
[logging]
level=WARN
level=${cfg.logLevel}
[connection]
ipv6.ip6-privacy=2
@ -138,6 +139,22 @@ in {
apply = list: (attrValues cfg.basePackages) ++ list;
};
dhcp = mkOption {
type = types.enum [ "dhclient" "dhcpcd" "internal" ];
default = "dhclient";
description = ''
Which program (or internal library) should be used for DHCP.
'';
};
logLevel = mkOption {
type = types.enum [ "OFF" "ERR" "WARN" "INFO" "DEBUG" "TRACE" ];
default = "WARN";
description = ''
Set the default logging verbosity level.
'';
};
appendNameservers = mkOption {
type = types.listOf types.str;
default = [];