Skip to content
Permalink
Browse files

networkmanager: add dhcp and loglevel config support

  • Loading branch information
peterhoeg committed Jan 23, 2018
1 parent 5402412 commit aed81388b6cf0e0409293fd45fd07fdb82bd92eb
Showing with 53 additions and 0 deletions.
  1. +53 −0 nixos/modules/services/networking/networkmanager.nix
@@ -27,6 +27,7 @@ let
[logging]
level=${cfg.logLevel}
audit=${if config.security.audit.enable then "true" else "false"}
[connection]
ipv6.ip6-privacy=2
@@ -37,6 +38,13 @@ let
[device]
wifi.scan-rand-mac-address=${if cfg.wifi.scanRandMacAddress then "yes" else "no"}
${lib.optionalString cfg.connectivityCheck.enable ''
[connectivity]
uri=${cfg.connectivityCheck.uri}
${cfg.extraConfig}
''}
'';

/*
@@ -157,6 +165,14 @@ in {
'';
};

dns = mkOption {
type = types.enum [ "default" "dnsmasq" "systemd-resolved" ];
default = "default";
description = ''
How to handle DNS resolution.
'';
};

logLevel = mkOption {
type = types.enum [ "OFF" "ERR" "WARN" "INFO" "DEBUG" "TRACE" ];
default = "WARN";
@@ -217,6 +233,43 @@ in {
'';
};

extraConfig = mkOption {
description = "Additional stanzas added verbatim to the configuration file.";
type = types.listOf types.str;
default = "";
};

connectivityCheck = mkOption {
description = "Perform connectivity check";
type = (types.submodule {
options = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Perform a connectivity check.
'';
};

uri = mkOption {
type = types.str;
default = "http://network-test.debian.org/nm";
description = ''
The URI to which we perform a connectivity check
'';
};

interval = mkOption {
type = types.int;
default = 300;
description = ''
The interval at which we perform a connectivity check
'';
};
};
});
};

dispatcherScripts = mkOption {
type = types.listOf (types.submodule {
options = {

0 comments on commit aed8138

Please sign in to comment.
You can’t perform that action at this time.