git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #25337 from benley/nm-dnsmasq

nixos: optional NetworkManager dnsmasq integration

commit689916b98f97fd02dc474bfb215cf2369eb8f17a authorMichael Raskin <7c6f434c@mail.ru> dateSun 30 Apr 2017, 12:18 (10 years ago) parent56a90b29827d5f
1 file changed+12
nixos/modules/services/networking/networkmanager.nix+12
nixos/modules/services/networking/networkmanager.nix+12
@@ -12,6 +12,7 @@ let
1212 configFile = writeText "NetworkManager.conf" ''
1313 [main]
1414 plugins=keyfile
15+ dns=${if cfg.useDnsmasq then "dnsmasq" else "default"}
1516
1617 [keyfile]
1718 ${optionalString (config.networking.hostName != "")
@@ -158,6 +159,17 @@ in {
158159 ethernet.macAddress = macAddressOpt;
159160 wifi.macAddress = macAddressOpt;
160161
162+ useDnsmasq = mkOption {
163+ type = types.bool;
164+ default = false;
165+ description = ''
166+ Enable NetworkManager's dnsmasq integration. NetworkManager will run
167+ dnsmasq as a local caching nameserver, using a "split DNS"
168+ configuration if you are connected to a VPN, and then update
169+ resolv.conf to point to the local nameserver.
170+ '';
171+ };
172+
161173 dispatcherScripts = mkOption {
162174 type = types.listOf (types.submodule {
163175 options = {