summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
author宋文武 <iyzsong@member.fsf.org>2019-11-09 17:05:50 +0800
committer宋文武 <iyzsong@member.fsf.org>2019-11-11 20:30:53 +0800
commit6ec68c69b08a873c5896dae9f8f234e44ea45738 (patch)
tree47db94e88358be122381c6bec6fd424dff500010 /doc
parenta35e16c00da84aa24832ada730c5c8e5e8a41c03 (diff)
services: Add knot-resolver-service-type.
* gnu/services/dns.scm (<knot-resolver-configuration>): New record type. (knot-resolver-activation, knot-resolver-shpherd-services): New procedures. (%knot-resolver-accounts, %kresd.conf, knot-resolver-service-type): New variables. * doc/guix.texi (DNS Services): Document it.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi38
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index aaad6e376b..2622079bcb 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -21086,6 +21086,44 @@ The list of knot-zone-configuration used by this configuration.
@end table
@end deftp
+@subsubheading Knot Resolver Service
+
+@deffn {Scheme Variable} knot-resolver-service-type
+This this the type of the knot resolver service, whose value should be
+an @code{knot-resolver-configuration} object as in this example:
+
+@lisp
+(service knot-resolver-service-type
+ (knot-resolver-configuration
+ (kresd-config-file (plain-file "kresd.conf" "
+net.listen('192.168.0.1', 5353)
+user('knot-resolver', 'knot-resolver')
+modules = @{ 'hints > iterate', 'stats', 'predict' @}
+cache.size = 100 * MB
+"))))
+@end lisp
+
+For more information, refer its @url{https://knot-resolver.readthedocs.org/en/stable/daemon.html#configuration, manual}.
+@end deffn
+
+@deftp {Data Type} knot-resolver-configuration
+Data type representing the configuration of knot-resolver.
+
+@table @asis
+@item @code{package} (default: @var{knot-resolver})
+Package object of the knot DNS resolver.
+
+@item @code{kresd-config-file} (default: %kresd.conf)
+File-like object of the kresd configuration file to use, by default it
+will listen on @code{127.0.0.1} and @code{::1}.
+
+@item @code{garbage-collection-interval} (default: 1000)
+Number of milliseconds for @code{kres-cache-gc} to periodically trim the cache.
+
+@end table
+@end deftp
+
+
@subsubheading Dnsmasq Service
@deffn {Scheme Variable} dnsmasq-service-type