commit c37332910ae4225bb81d8f7bd041159601f95ecf
parent 59ce03630a5f8c52b35c49ac4f98b9d7dd9735a8
Author: Daniel Barlow <dan@telent.net>
Date: Sat, 25 Feb 2023 22:53:50 +0000
add option to provide dnsmasq resolv-file from a service
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/pkgs/liminix-tools/networking/dnsmasq.nix b/pkgs/liminix-tools/networking/dnsmasq.nix
@@ -7,6 +7,7 @@
{
user ? "dnsmasq"
, group ? "system"
+, resolvconf ? null
, interface
, upstreams ? []
, ranges
@@ -30,10 +31,12 @@ in longrun {
${lib.concatStringsSep " " (builtins.map (r: "--server=${r}") upstreams)} \
--keep-in-foreground \
--dhcp-authoritative \
- --no-resolv \
+ ${if resolvconf != null then "--resolv-file=$(output_path ${resolvconf} resolv.conf)" else "--no-resolv"} \
+ --no-hosts \
--log-dhcp \
--enable-ra \
--log-debug \
+ --log-queries \
--log-facility=- \
--dhcp-leasefile=/run/${name}.leases \
--pid-file=/run/${name}.pid