git.iko.soy/typeable/nixpkgs
on master help sign in
nixos: optional NetworkManager dnsmasq integration
commit9827d5f95cc71cf47eeaec1d1ddf08633e8490cb authorBenjamin Staffin <benley@gmail.com> dateSun 30 Apr 2017, 00:42 (10 years ago) parent03f939e
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 = {