Skip to content

Commit a087081

Browse files
committedJun 2, 2017
network-manager: add support for internal DHCP
1 parent 1fe17ee commit a087081

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed
 

‎nixos/modules/services/networking/networkmanager.nix

+19-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ let
1212
configFile = writeText "NetworkManager.conf" ''
1313
[main]
1414
plugins=keyfile
15+
dhcp=${cfg.dhcp}
1516
dns=${if cfg.useDnsmasq then "dnsmasq" else "default"}
1617
1718
[keyfile]
@@ -21,7 +22,7 @@ let
2122
''unmanaged-devices=${lib.concatStringsSep ";" cfg.unmanaged}''}
2223
2324
[logging]
24-
level=WARN
25+
level=${cfg.logLevel}
2526
2627
[connection]
2728
ipv6.ip6-privacy=2
@@ -138,6 +139,22 @@ in {
138139
apply = list: (attrValues cfg.basePackages) ++ list;
139140
};
140141

142+
dhcp = mkOption {
143+
type = types.enum [ "dhclient" "dhcpcd" "internal" ];
144+
default = "dhclient";
145+
description = ''
146+
Which program (or internal library) should be used for DHCP.
147+
'';
148+
};
149+
150+
logLevel = mkOption {
151+
type = types.enum [ "OFF" "ERR" "WARN" "INFO" "DEBUG" "TRACE" ];
152+
default = "WARN";
153+
description = ''
154+
Set the default logging verbosity level.
155+
'';
156+
};
157+
141158
appendNameservers = mkOption {
142159
type = types.listOf types.str;
143160
default = [];
@@ -181,7 +198,7 @@ in {
181198
};
182199

183200
type = mkOption {
184-
type = types.enum (attrNames dispatcherTypesSubdirMap);
201+
type = types.enum (attrNames dispatcherTypesSubdirMap);
185202
default = "basic";
186203
description = ''
187204
Dispatcher hook type. Only basic hooks are currently available.

0 commit comments

Comments
 (0)
Please sign in to comment.