From 6ec68c69b08a873c5896dae9f8f234e44ea45738 Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Sat, 9 Nov 2019 17:05:50 +0800 Subject: services: Add knot-resolver-service-type. * gnu/services/dns.scm (): 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. --- doc/guix.texi | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'doc') 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 -- cgit v1.2.3