* [bug#70706] [PATCH] gnu: services: dns: Escape hatch for dnsmasq-configuration.
@ 2024-05-01 20:43 Sergey Trofimov
2024-06-13 20:43 ` bug#70706: " Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Sergey Trofimov @ 2024-05-01 20:43 UTC (permalink / raw)
To: 70706; +Cc: Sergey Trofimov
* gnu/service/dns.scm: (<dnsmasq-configuration>)[extra-options]: Add.
* doc/guix.texi: Document (<dnsmasq-configuration>)[extra-options].
---
doc/guix.texi | 4 ++++
gnu/services/dns.scm | 7 +++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 749d689ac1..17798becd5 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -33498,6 +33498,10 @@ DNS Services
resolving MAC addresses is only possible if the client is in the local
network or obtained a DHCP lease from dnsmasq.
+@item @code{extra-options} (default: @code{'()})
+This option provides an ``escape hatch'' for the user to provide arbitrary
+command-line arguments to @command{dnsmasq} as a list of strings.
+
@end table
@end deftp
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm
index 6608046909..043c34599c 100644
--- a/gnu/services/dns.scm
+++ b/gnu/services/dns.scm
@@ -739,6 +739,8 @@ (define-record-type* <dnsmasq-configuration>
(default #t)) ;boolean
(listen-addresses dnsmasq-configuration-listen-address
(default '())) ;list of string
+ (extra-options dnsmasq-configuration-extra-options
+ (default '())) ;list of string
(resolv-file dnsmasq-configuration-resolv-file
(default "/etc/resolv.conf")) ;string
(no-resolv? dnsmasq-configuration-no-resolv?
@@ -798,7 +800,7 @@ (define (dnsmasq-shepherd-service config)
tftp-single-port? tftp-secure?
tftp-max tftp-mtu tftp-no-blocksize?
tftp-lowercase? tftp-port-range
- tftp-root tftp-unique-root)
+ tftp-root tftp-unique-root extra-options)
(shepherd-service
(provision '(dnsmasq))
(requirement '(networking))
@@ -877,7 +879,8 @@ (define (dnsmasq-shepherd-service config)
(if (> (length tftp-unique-root) 0)
(format #f "--tftp-unique-root=~a" tftp-unique-root)
(format #f "--tftp-unique-root")))
- '()))
+ '())
+ #$@extra-options)
#:pid-file "/run/dnsmasq.pid"))
(stop #~(make-kill-destructor)))))
base-commit: 5c13ab50b9c7d44238c64e5337027f04ae1d9223
--
2.41.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#70706: [PATCH] gnu: services: dns: Escape hatch for dnsmasq-configuration.
2024-05-01 20:43 [bug#70706] [PATCH] gnu: services: dns: Escape hatch for dnsmasq-configuration Sergey Trofimov
@ 2024-06-13 20:43 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2024-06-13 20:43 UTC (permalink / raw)
To: Sergey Trofimov; +Cc: 70706-done
Sergey Trofimov <sarg@sarg.org.ru> skribis:
> * gnu/service/dns.scm: (<dnsmasq-configuration>)[extra-options]: Add.
> * doc/guix.texi: Document (<dnsmasq-configuration>)[extra-options].
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-13 20:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-01 20:43 [bug#70706] [PATCH] gnu: services: dns: Escape hatch for dnsmasq-configuration Sergey Trofimov
2024-06-13 20:43 ` bug#70706: " Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).