mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
nixos: optional NetworkManager dnsmasq integration
This commit is contained in:
parent
03f939ebf7
commit
9827d5f95c
1 changed files with 12 additions and 0 deletions
|
@ -12,6 +12,7 @@ let
|
|||
configFile = writeText "NetworkManager.conf" ''
|
||||
[main]
|
||||
plugins=keyfile
|
||||
dns=${if cfg.useDnsmasq then "dnsmasq" else "default"}
|
||||
|
||||
[keyfile]
|
||||
${optionalString (config.networking.hostName != "")
|
||||
|
@ -158,6 +159,17 @@ in {
|
|||
ethernet.macAddress = macAddressOpt;
|
||||
wifi.macAddress = macAddressOpt;
|
||||
|
||||
useDnsmasq = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
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.
|
||||
'';
|
||||
};
|
||||
|
||||
dispatcherScripts = mkOption {
|
||||
type = types.listOf (types.submodule {
|
||||
options = {
|
||||
|
|
Loading…
Reference in a new issue