forked from dan/liminix
1
0
Fork 0

add option to provide dnsmasq resolv-file from a service

This commit is contained in:
Daniel Barlow 2023-02-25 22:53:50 +00:00
parent 59ce03630a
commit c37332910a
1 changed files with 4 additions and 1 deletions

View File

@ -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