guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

07/07: services: dnsmasq: Allow custom Shepherd provision


From: guix-commits
Subject: 07/07: services: dnsmasq: Allow custom Shepherd provision
Date: Sat, 4 Jan 2025 17:38:13 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 66df3296c4a8012c745c792cd95edfe2aad81031
Author: 45mg <45mg.writes@gmail.com>
AuthorDate: Fri Dec 27 08:29:52 2024 -0500

    services: dnsmasq: Allow custom Shepherd provision
    
    Allow users to have multiple dnsmasq instances by specifying different
    `provision` values for the corresponding Shepherd services, similar to
    what is done with `static-networking-service-type`.
    
    * gnu/services/dns.scm (<dnsmasq-configuration>)[provision]: new option.
    (dnsmasq-shepherd-service): Use supplied provision value.
    * doc/guix.texi (DNS Services)[dnsmasq-configuration]: Document it.
    
    Change-Id: I78c7f015cb1db239a600bc5373b2fd80e8b9b9f4
    Signed-off-by: Ludovic Courtès <ludo@gnu.org>
    Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
 doc/guix.texi        | 4 ++++
 gnu/services/dns.scm | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 924f13f0f6..605f822d2b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -34169,6 +34169,10 @@ Data type representing the configuration of dnsmasq.
 @item @code{package} (default: @var{dnsmasq})
 Package object of the dnsmasq server.
 
+@item @code{provision} (default: @code{'(dnsmasq)})
+A list of symbols for the Shepherd service corresponding to this dnsmasq
+configuration.
+
 @item @code{no-hosts?} (default: @code{#f})
 When true, don't read the hostnames in /etc/hosts.
 
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm
index 043c34599c..532e20e38a 100644
--- a/gnu/services/dns.scm
+++ b/gnu/services/dns.scm
@@ -731,6 +731,8 @@ cache.size = 100 * MB
   dnsmasq-configuration?
   (package          dnsmasq-configuration-package
                     (default dnsmasq))  ;file-like
+  (provision        dnsmasq-provision
+                    (default '(dnsmasq)))
   (no-hosts?        dnsmasq-configuration-no-hosts?
                     (default #f))       ;boolean
   (port             dnsmasq-configuration-port
@@ -802,7 +804,7 @@ cache.size = 100 * MB
      tftp-lowercase? tftp-port-range
      tftp-root tftp-unique-root extra-options)
     (shepherd-service
-     (provision '(dnsmasq))
+     (provision (dnsmasq-provision config))
      (requirement '(networking))
      (documentation "Run the dnsmasq DNS server.")
      (start #~(make-forkexec-constructor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]