dnsmasq: Add extraConfig option

This commit is contained in:
Rickard Nilsson 2012-11-12 17:58:48 +01:00
parent 2f833bc88d
commit 02e0d7dbc3

View File

@ -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
<literal>dnsmasq.conf</literal>
'';
};
};
};
@ -49,7 +62,7 @@ in
daemonType = "daemon";
exec = "${dnsmasq}/bin/dnsmasq -R ${serversParam} -o";
exec = "${dnsmasq}/bin/dnsmasq -R ${serversParam} -o -C ${dnsmasqConf}";
};
};