aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/dns.scm
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2019-04-19 22:20:03 +0200
committerJulien Lepiller <julien@lepiller.eu>2019-04-25 21:44:55 +0200
commit92eb600f8a94afa36142f8f145efaa485b632433 (patch)
tree1745a9f7607012f703119b493017f5958e1280a6 /gnu/services/dns.scm
parentca3cf2d58ec3aef566fd0cf9d467df501cab9802 (diff)
downloadpatches-92eb600f8a94afa36142f8f145efaa485b632433.tar
patches-92eb600f8a94afa36142f8f145efaa485b632433.tar.gz
gnu: knot-service: Add includes field in configuration.
* gnu/services/dns.scm (knot-configuration): Add includes field. (verify-knot-configuration): Check includes content. (knot-config-file): Serialize includes. * doc/guix.texi (DNS Services): Document it.
Diffstat (limited to 'gnu/services/dns.scm')
-rw-r--r--gnu/services/dns.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm
index 1ef754b360..445e03570a 100644
--- a/gnu/services/dns.scm
+++ b/gnu/services/dns.scm
@@ -207,6 +207,8 @@
(default knot))
(run-directory knot-configuration-run-directory
(default "/var/run/knot"))
+ (includes knot-configuration-includes
+ (default '()))
(listen-v4 knot-configuration-listen-v4
(default "0.0.0.0"))
(listen-v6 knot-configuration-listen-v6
@@ -296,6 +298,8 @@
(error-out "knot configuration field must be a package."))
(unless (string? (knot-configuration-run-directory config))
(error-out "run-directory must be a string."))
+ (unless (list? (knot-configuration-includes config))
+ (error-out "includes must be a list of strings or file-like objects."))
(unless (list? (knot-configuration-keys config))
(error-out "keys must be a list of knot-key-configuration."))
(for-each (lambda (key) (verify-knot-key-configuration key))
@@ -529,6 +533,10 @@
#~(begin
(call-with-output-file #$output
(lambda (port)
+ (if (knot-configuration-includes config)
+ (for-each (lambda (inc)
+ (format port "include: ~a\n" inc))
+ (knot-configuration-includes config)))
(format port "server:\n")
(format port " rundir: ~a\n" #$(knot-configuration-run-directory config))
(format port " user: knot\n")