forked from mirrors/nixpkgs
NetworkManager: add noDns option
This commit is contained in:
parent
9e968fb553
commit
6c4c36fcbc
|
@ -227,6 +227,12 @@ $ nix-instantiate -E '(import <nixpkgsunstable> {}).gitFull'
|
|||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>networking.networkmanager.useDnsmasq</literal> has been deprecated. Use
|
||||
<literal>networking.networkmanager.dns</literal> instead.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
@ -17,6 +17,7 @@ with lib;
|
|||
(mkRenamedOptionModule [ "networking" "enableIntel2100BGFirmware" ] [ "hardware" "enableRedistributableFirmware" ])
|
||||
(mkRenamedOptionModule [ "networking" "enableRalinkFirmware" ] [ "hardware" "enableRedistributableFirmware" ])
|
||||
(mkRenamedOptionModule [ "networking" "enableRTL8192cFirmware" ] [ "hardware" "enableRedistributableFirmware" ])
|
||||
(mkRenamedOptionModule [ "networking" "networkmanager" "useDnsmasq" ] [ "networking" "networkmanager" "dns" ])
|
||||
|
||||
(mkRenamedOptionModule [ "services" "cadvisor" "host" ] [ "services" "cadvisor" "listenAddress" ])
|
||||
(mkChangedOptionModule [ "services" "printing" "gutenprint" ] [ "services" "printing" "drivers" ]
|
||||
|
|
|
@ -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.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue