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>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>networking.networkmanager.useDnsmasq</literal> has been deprecated. Use
|
||||||
|
<literal>networking.networkmanager.dns</literal> instead.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -17,6 +17,7 @@ with lib;
|
||||||
(mkRenamedOptionModule [ "networking" "enableIntel2100BGFirmware" ] [ "hardware" "enableRedistributableFirmware" ])
|
(mkRenamedOptionModule [ "networking" "enableIntel2100BGFirmware" ] [ "hardware" "enableRedistributableFirmware" ])
|
||||||
(mkRenamedOptionModule [ "networking" "enableRalinkFirmware" ] [ "hardware" "enableRedistributableFirmware" ])
|
(mkRenamedOptionModule [ "networking" "enableRalinkFirmware" ] [ "hardware" "enableRedistributableFirmware" ])
|
||||||
(mkRenamedOptionModule [ "networking" "enableRTL8192cFirmware" ] [ "hardware" "enableRedistributableFirmware" ])
|
(mkRenamedOptionModule [ "networking" "enableRTL8192cFirmware" ] [ "hardware" "enableRedistributableFirmware" ])
|
||||||
|
(mkRenamedOptionModule [ "networking" "networkmanager" "useDnsmasq" ] [ "networking" "networkmanager" "dns" ])
|
||||||
|
|
||||||
(mkRenamedOptionModule [ "services" "cadvisor" "host" ] [ "services" "cadvisor" "listenAddress" ])
|
(mkRenamedOptionModule [ "services" "cadvisor" "host" ] [ "services" "cadvisor" "listenAddress" ])
|
||||||
(mkChangedOptionModule [ "services" "printing" "gutenprint" ] [ "services" "printing" "drivers" ]
|
(mkChangedOptionModule [ "services" "printing" "gutenprint" ] [ "services" "printing" "drivers" ]
|
||||||
|
|
|
@ -10,7 +10,8 @@ let
|
||||||
stateDirs = "/var/lib/NetworkManager /var/lib/dhclient /var/lib/misc";
|
stateDirs = "/var/lib/NetworkManager /var/lib/dhclient /var/lib/misc";
|
||||||
|
|
||||||
dns =
|
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.resolved.enable then "systemd-resolved"
|
||||||
else if config.services.unbound.enable then "unbound"
|
else if config.services.unbound.enable then "unbound"
|
||||||
else "default";
|
else "default";
|
||||||
|
@ -205,14 +206,20 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
useDnsmasq = mkOption {
|
dns = mkOption {
|
||||||
type = types.bool;
|
type = types.enum [ "auto" "dnsmasq" "none" ];
|
||||||
default = false;
|
default = "auto";
|
||||||
description = ''
|
description = ''
|
||||||
Enable NetworkManager's dnsmasq integration. NetworkManager will run
|
Options:
|
||||||
dnsmasq as a local caching nameserver, using a "split DNS"
|
- auto: Check for systemd-resolved, unbound, or use default.
|
||||||
configuration if you are connected to a VPN, and then update
|
- dnsmasq:
|
||||||
resolv.conf to point to the local nameserver.
|
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