From 02e0d7dbc349e8d59a58f1cc23497b1c1d3ff3c4 Mon Sep 17 00:00:00 2001 From: Rickard Nilsson Date: Mon, 12 Nov 2012 17:58:48 +0100 Subject: dnsmasq: Add extraConfig option --- modules/services/networking/dnsmasq.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'modules/services/networking/dnsmasq.nix') diff --git a/modules/services/networking/dnsmasq.nix b/modules/services/networking/dnsmasq.nix index 0d786add881..b726493d421 100644 --- a/modules/services/networking/dnsmasq.nix +++ b/modules/services/networking/dnsmasq.nix @@ -8,6 +8,10 @@ let serversParam = concatMapStrings (s: "-S ${s} ") cfg.servers; + dnsmasqConf = pkgs.writeText "dnsmasq.conf" '' + ${cfg.extraConfig} + ''; + in { @@ -33,6 +37,15 @@ in ''; }; + extraConfig = mkOption { + type = types.string; + default = ""; + description = '' + Extra configuration directives that should be added to + dnsmasq.conf + ''; + }; + }; }; @@ -49,7 +62,7 @@ in daemonType = "daemon"; - exec = "${dnsmasq}/bin/dnsmasq -R ${serversParam} -o"; + exec = "${dnsmasq}/bin/dnsmasq -R ${serversParam} -o -C ${dnsmasqConf}"; }; }; -- cgit 1.4.1