From c37332910ae4225bb81d8f7bd041159601f95ecf Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sat, 25 Feb 2023 22:53:50 +0000 Subject: [PATCH] add option to provide dnsmasq resolv-file from a service --- pkgs/liminix-tools/networking/dnsmasq.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/liminix-tools/networking/dnsmasq.nix b/pkgs/liminix-tools/networking/dnsmasq.nix index 8c98ab2..8a0952d 100644 --- 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