diff options
author | jD91mZM2 <me@krake.one> | 2018-05-03 14:05:43 +0200 |
---|---|---|
committer | jD91mZM2 <me@krake.one> | 2018-05-08 13:42:39 +0200 |
commit | 6c4c36fcbc2fcf4b7c1fcf4b372a94b069d3ee3d (patch) | |
tree | c735918c7d55769bb87f900cc103a61b52640778 /nixos/modules/services/networking | |
parent | 9e968fb553b7bcf3130073b7d02ff8611fee39b8 (diff) | |
download | nixlib-6c4c36fcbc2fcf4b7c1fcf4b372a94b069d3ee3d.tar nixlib-6c4c36fcbc2fcf4b7c1fcf4b372a94b069d3ee3d.tar.gz nixlib-6c4c36fcbc2fcf4b7c1fcf4b372a94b069d3ee3d.tar.bz2 nixlib-6c4c36fcbc2fcf4b7c1fcf4b372a94b069d3ee3d.tar.lz nixlib-6c4c36fcbc2fcf4b7c1fcf4b372a94b069d3ee3d.tar.xz nixlib-6c4c36fcbc2fcf4b7c1fcf4b372a94b069d3ee3d.tar.zst nixlib-6c4c36fcbc2fcf4b7c1fcf4b372a94b069d3ee3d.zip |
NetworkManager: add noDns option
Diffstat (limited to 'nixos/modules/services/networking')
-rw-r--r-- | nixos/modules/services/networking/networkmanager.nix | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix index 10e96eb40362..f4c4adcaaeb8 100644 --- a/nixos/modules/services/networking/networkmanager.nix +++ b/nixos/modules/services/networking/networkmanager.nix @@ -10,7 +10,8 @@ let stateDirs = "/var/lib/NetworkManager /var/lib/dhclient /var/lib/misc"; dns = - if cfg.useDnsmasq then "dnsmasq" + if cfg.dns == "none" then "none" + else if cfg.dns == "dnsmasq" then "dnsmasq" else if config.services.resolved.enable then "systemd-resolved" else if config.services.unbound.enable then "unbound" else "default"; @@ -205,14 +206,20 @@ in { }; }; - useDnsmasq = mkOption { - type = types.bool; - default = false; + dns = mkOption { + type = types.enum [ "auto" "dnsmasq" "none" ]; + default = "auto"; description = '' - Enable NetworkManager's dnsmasq integration. NetworkManager will run - dnsmasq as a local caching nameserver, using a "split DNS" - configuration if you are connected to a VPN, and then update - resolv.conf to point to the local nameserver. + Options: + - auto: Check for systemd-resolved, unbound, or use default. + - dnsmasq: + Enable NetworkManager's dnsmasq integration. NetworkManager will run + dnsmasq as a local caching nameserver, using a "split DNS" + configuration if you are connected to a VPN, and then update + resolv.conf to point to the local nameserver. + - none: + Disable NetworkManager's DNS integration completely. + It will not touch your /etc/resolv.conf. ''; }; |