summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorAndreas Enge <andreas@enge.fr>2023-03-20 18:21:47 +0100
committerAndreas Enge <andreas@enge.fr>2023-03-20 18:49:06 +0100
commitccb62d8feb50e2859d7c41429a9e3d9e0fe30bfe (patch)
tree4ab573cee33f277828ad553a22579175b1dda22d /doc
parent098bd280f82350073e8280e37d56a14162eed09c (diff)
parentf80215c7c4ae5ea0c316f4766e6c05ae4218ede3 (diff)
downloadguix-ccb62d8feb50e2859d7c41429a9e3d9e0fe30bfe.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'doc')
-rw-r--r--doc/contributing.texi12
-rw-r--r--doc/guix.texi1787
2 files changed, 1110 insertions, 689 deletions
diff --git a/doc/contributing.texi b/doc/contributing.texi
index c436bc4a31..911c3a7bbf 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -1170,6 +1170,16 @@ Please write commit logs in the ChangeLog format (@pxref{Change Logs,,,
 standards, GNU Coding Standards}); you can check the commit history for
 examples.
 
+You can help make the review process more efficient, and increase the
+chance that your patch will be reviewed quickly, by describing the
+context of your patch and the impact you expect it to have.  For
+example, if your patch is fixing something that is broken, describe the
+problem and how your patch fixes it.  Tell us how you have tested your
+patch.  Will users of the code changed by your patch have to adjust
+their workflow at all?  If so, tell us how.  In general, try to imagine
+what questions a reviewer will ask, and answer those questions in
+advance.
+
 Before submitting a patch that adds or modifies a package definition,
 please run through this check list:
 
@@ -1478,7 +1488,7 @@ Due to an apparent bug in @command{git send-email},
 @end quotation
 
 You can find out @var{ISSUE_NUMBER} either by searching on the mumi
-interface at @url{issues.guix.gnu.org} for the name of your patch or
+interface at @url{https://issues.guix.gnu.org} for the name of your patch or
 reading the acknowledgement email sent automatically by Debbugs in
 reply to incoming bugs and patches, which contains the bug number.
 
diff --git a/doc/guix.texi b/doc/guix.texi
index c59f0ccb4c..b6363de578 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -36,7 +36,7 @@ Copyright @copyright{} 2016, 2017, 2018, 2021 Chris Marusich@*
 Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner@*
 Copyright @copyright{} 2016 John Darrington@*
 Copyright @copyright{} 2016, 2017 Nikita Gillmann@*
-Copyright @copyright{} 2016, 2017, 2018, 2019, 2021, 2022 Jan Nieuwenhuizen@*
+Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Jan Nieuwenhuizen@*
 Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Julien Lepiller@*
 Copyright @copyright{} 2016 Alex ter Weele@*
 Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Christopher Baines@*
@@ -71,7 +71,7 @@ Copyright @copyright{} 2019 Kyle Andrews@*
 Copyright @copyright{} 2019 Alex Griffin@*
 Copyright @copyright{} 2019, 2020, 2021, 2022 Guillaume Le Vaillant@*
 Copyright @copyright{} 2020 Liliana Marie Prikler@*
-Copyright @copyright{} 2019, 2020, 2021, 2022 Simon Tournier@*
+Copyright @copyright{} 2019, 2020, 2021, 2022, 2023 Simon Tournier@*
 Copyright @copyright{} 2020 Wiktor Żelazny@*
 Copyright @copyright{} 2020 Damien Cassou@*
 Copyright @copyright{} 2020 Jakub Kądziołka@*
@@ -1976,8 +1976,7 @@ versions may be incompatible.
 
 @cindex name service switch, glibc
 @cindex NSS (name service switch), glibc
-@cindex nscd (name service caching daemon)
-@cindex name service caching daemon (nscd)
+@cindex @abbr{nscd, name service cache daemon}
 When using Guix on a foreign distro, we @emph{strongly recommend} that
 the system run the GNU C library's @dfn{name service cache daemon},
 @command{nscd}, which should be listening on the
@@ -2946,9 +2945,9 @@ mount /dev/sda2 /mnt
 Mount special block devices and Linux-specific directories:
 
 @example sh
-mount --bind /proc /mnt/proc
-mount --bind /sys /mnt/sys
-mount --bind /dev /mnt/dev
+mount --rbind /proc /mnt/proc
+mount --rbind /sys /mnt/sys
+mount --rbind /dev /mnt/dev
 @end example
 
 If your system is EFI-based, you must also mount the ESP partition.
@@ -4959,60 +4958,57 @@ be much faster because the Guix revision will be cached.
 The @code{(guix inferior)} module provides the following procedures to open an
 inferior:
 
-@deffn {Scheme Procedure} inferior-for-channels @var{channels} @
-   [#:cache-directory] [#:ttl]
+@defun inferior-for-channels channels [#:cache-directory] [#:ttl]
 Return an inferior for @var{channels}, a list of channels.  Use the cache at
 @var{cache-directory}, where entries can be reclaimed after @var{ttl} seconds.
 This procedure opens a new connection to the build daemon.
 
 As a side effect, this procedure may build or substitute binaries for
 @var{channels}, which can take time.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} open-inferior @var{directory} @
-  [#:command "bin/guix"]
+@defun open-inferior directory [#:command "bin/guix"]
 Open the inferior Guix in @var{directory}, running
 @code{@var{directory}/@var{command} repl} or equivalent.  Return @code{#f} if
 the inferior could not be launched.
-@end deffn
+@end defun
 
 @cindex inferior packages
 The procedures listed below allow you to obtain and manipulate inferior
 packages.
 
-@deffn {Scheme Procedure} inferior-packages @var{inferior}
+@defun inferior-packages inferior
 Return the list of packages known to @var{inferior}.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} lookup-inferior-packages @var{inferior} @var{name} @
-   [@var{version}]
+@defun lookup-inferior-packages inferior name [version]
 Return the sorted list of inferior packages matching @var{name} in
 @var{inferior}, with highest version numbers first.  If @var{version} is true,
 return only packages with a version number prefixed by @var{version}.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} inferior-package? @var{obj}
+@defun inferior-package? obj
 Return true if @var{obj} is an inferior package.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} inferior-package-name @var{package}
-@deffnx {Scheme Procedure} inferior-package-version @var{package}
-@deffnx {Scheme Procedure} inferior-package-synopsis @var{package}
-@deffnx {Scheme Procedure} inferior-package-description @var{package}
-@deffnx {Scheme Procedure} inferior-package-home-page @var{package}
-@deffnx {Scheme Procedure} inferior-package-location @var{package}
-@deffnx {Scheme Procedure} inferior-package-inputs @var{package}
-@deffnx {Scheme Procedure} inferior-package-native-inputs @var{package}
-@deffnx {Scheme Procedure} inferior-package-propagated-inputs @var{package}
-@deffnx {Scheme Procedure} inferior-package-transitive-propagated-inputs @var{package}
-@deffnx {Scheme Procedure} inferior-package-native-search-paths @var{package}
-@deffnx {Scheme Procedure} inferior-package-transitive-native-search-paths @var{package}
-@deffnx {Scheme Procedure} inferior-package-search-paths @var{package}
+@defun inferior-package-name package
+@defunx inferior-package-version package
+@defunx inferior-package-synopsis package
+@defunx inferior-package-description package
+@defunx inferior-package-home-page package
+@defunx inferior-package-location package
+@defunx inferior-package-inputs package
+@defunx inferior-package-native-inputs package
+@defunx inferior-package-propagated-inputs package
+@defunx inferior-package-transitive-propagated-inputs package
+@defunx inferior-package-native-search-paths package
+@defunx inferior-package-transitive-native-search-paths package
+@defunx inferior-package-search-paths package
 These procedures are the counterpart of package record accessors
 (@pxref{package Reference}).  Most of them work by querying the inferior
 @var{package} comes from, so the inferior must still be live when you call
 these procedures.
-@end deffn
+@end defun
 
 Inferior packages can be used transparently like any other package or
 file-like object in G-expressions (@pxref{G-Expressions}).  They are also
@@ -5943,6 +5939,22 @@ building or downloading any missing package, and runs the
 guix shell python python-numpy -- python3
 @end example
 
+@quotation Note
+@cindex shebang, for @command{guix shell}
+@command{guix shell} can be also be used as a script interpreter, also
+known as @dfn{shebang}.  Here is an example self-contained Python script
+making use of this feature:
+
+@example
+#!/usr/bin/env -S guix shell python python-numpy -- python3
+import numpy
+print("This is numpy", numpy.version.version)
+@end example
+
+You may pass any @command{guix shell} option, but there's one caveat:
+the Linux kernel has a limit of 127 bytes on shebang length.
+@end quotation
+
 Development environments can be created as in the example below, which
 spawns an interactive shell containing all the dependencies and
 environment variables needed to work on Inkscape:
@@ -7576,7 +7588,7 @@ That derivation is stored in a @file{.drv} file under @file{/gnu/store}.
 The build actions it prescribes may then be realized by using the
 @code{build-derivations} procedure (@pxref{The Store}).
 
-@deffn {Scheme Procedure} package-derivation @var{store} @var{package} [@var{system}]
+@defun package-derivation store package [system]
 Return the @code{<derivation>} object of @var{package} for @var{system}
 (@pxref{Derivations}).
 
@@ -7585,22 +7597,21 @@ must be a string denoting the target system type---e.g.,
 @code{"x86_64-linux"} for an x86_64 Linux-based GNU system.  @var{store}
 must be a connection to the daemon, which operates on the store
 (@pxref{The Store}).
-@end deffn
+@end defun
 
 @noindent
 @cindex cross-compilation
 Similarly, it is possible to compute a derivation that cross-builds a
 package for some other system:
 
-@deffn {Scheme Procedure} package-cross-derivation @var{store} @
-            @var{package} @var{target} [@var{system}]
+@defun package-cross-derivation store package target [system]
 Return the @code{<derivation>} object of @var{package} cross-built from
 @var{system} to @var{target}.
 
 @var{target} must be a valid GNU triplet denoting the target hardware
 and operating system, such as @code{"aarch64-linux-gnu"}
 (@pxref{Specifying Target Triplets,,, autoconf, Autoconf}).
-@end deffn
+@end defun
 
 Once you have package definitions, you can easily define @emph{variants}
 of those packages.  @xref{Defining Package Variants}, for more on that.
@@ -7786,7 +7797,7 @@ automatically corrected.
 @end table
 @end deftp
 
-@deffn {Scheme Syntax} this-package
+@defmac this-package
 When used in the @emph{lexical scope} of a package field definition, this
 identifier resolves to the package being defined.
 
@@ -7806,15 +7817,15 @@ cross-compiling:
 @end lisp
 
 It is an error to refer to @code{this-package} outside a package definition.
-@end deffn
+@end defmac
 
 The following helper procedures are provided to help deal with package
 inputs.
 
-@deffn {Scheme Procedure} lookup-package-input @var{package} @var{name}
-@deffnx {Scheme Procedure} lookup-package-native-input @var{package} @var{name}
-@deffnx {Scheme Procedure} lookup-package-propagated-input @var{package} @var{name}
-@deffnx {Scheme Procedure} lookup-package-direct-input @var{package} @var{name}
+@defun lookup-package-input package name
+@defunx lookup-package-native-input package name
+@defunx lookup-package-propagated-input package name
+@defunx lookup-package-direct-input package name
 Look up @var{name} among @var{package}'s inputs (or native, propagated,
 or direct inputs).  Return it if found, @code{#f} otherwise.
 
@@ -7830,7 +7841,7 @@ use it:
 
 In this example we obtain the @code{gmp} package that is among the
 direct inputs of @code{coreutils}.
-@end deffn
+@end defun
 
 @cindex development inputs, of a package
 @cindex implicit inputs, of a package
@@ -7839,8 +7850,7 @@ Sometimes you will want to obtain the list of inputs needed to
 package is compiled.  This is what the @code{package-development-inputs}
 procedure returns.
 
-@deffn {Scheme Procedure} package-development-inputs @var{package} @
-   [@var{system}] [#:target #f]
+@defun package-development-inputs package [system] [#:target #f]
 Return the list of inputs required by @var{package} for development
 purposes on @var{system}.  When @var{target} is true, return the inputs
 needed to cross-compile @var{package} from @var{system} to
@@ -7871,7 +7881,7 @@ because @code{hello} has zero explicit dependencies.  Conversely,
 gzip, GCC, libc, Bash, and more.  To visualize it, @command{guix graph
 hello} would show you explicit inputs, whereas @command{guix graph -t
 bag hello} would include implicit inputs (@pxref{Invoking guix graph}).
-@end deffn
+@end defun
 
 Because packages are regular Scheme objects that capture a complete
 dependency graph and associated build procedures, it is often useful to
@@ -7879,7 +7889,7 @@ write procedures that take a package and return a modified version
 thereof according to some parameters.  Below are a few examples.
 
 @cindex tool chain, choosing a package's tool chain
-@deffn {Scheme Procedure} package-with-c-toolchain @var{package} @var{toolchain}
+@defun package-with-c-toolchain package toolchain
 Return a variant of @var{package} that uses @var{toolchain} instead of
 the default GNU C/C++ toolchain.  @var{toolchain} must be a list of
 inputs (label/package tuples) providing equivalent functionality, such
@@ -7900,7 +7910,7 @@ fields and is instead pulled in by the build system.  Consequently, this
 procedure works by changing the build system of @var{package} so that it
 pulls in @var{toolchain} instead of the defaults.  @ref{Build Systems},
 for more on build systems.
-@end deffn
+@end defun
 
 @node origin Reference
 @subsection @code{origin} Reference
@@ -8017,8 +8027,7 @@ retrieved is determined by its @code{method} field.  The @code{(guix
 download)} module provides the most common method, @code{url-fetch},
 described below.
 
-@deffn {Scheme Procedure} url-fetch @var{url} @var{hash-algo} @var{hash} @
-           [name] [#:executable? #f]
+@defun url-fetch url hash-algo hash [name] [#:executable? #f]
 Return a fixed-output derivation that fetches data from @var{url} (a
 string, or a list of strings denoting alternate URLs), which is expected
 to have hash @var{hash} of type @var{hash-algo} (a symbol).  By default,
@@ -8031,19 +8040,19 @@ interpreted as the name of a mirror scheme, taken from @file{%mirror-file}.
 
 Alternatively, when URL starts with @code{file://}, return the
 corresponding file name in the store.
-@end deffn
+@end defun
 
 Likewise, the @code{(guix git-download)} module defines the
 @code{git-fetch} origin method, which fetches data from a Git version
 control repository, and the @code{git-reference} data type to describe
 the repository and revision to fetch.
 
-@deffn {Scheme Procedure} git-fetch @var{ref} @var{hash-algo} @var{hash}
+@defun git-fetch ref hash-algo hash
 Return a fixed-output derivation that fetches @var{ref}, a
 @code{<git-reference>} object.  The output is expected to have recursive
 hash @var{hash} of type @var{hash-algo} (a symbol).  Use @var{name} as
 the file name, or a generic name if @code{#f}.
-@end deffn
+@end defun
 
 @deftp {Data Type} git-reference
 This data type represents a Git reference for @code{git-fetch} to
@@ -8086,13 +8095,12 @@ For Mercurial repositories, the module @code{(guix hg-download)} defines
 the @code{hg-fetch} origin method and @code{hg-reference} data type for
 support of the Mercurial version control system.
 
-@deffn {Scheme Procedure} hg-fetch @var{ref} @var{hash-algo} @var{hash} @
-           [name]
+@defun hg-fetch ref hash-algo hash [name]
 Return a fixed-output derivation that fetches @var{ref}, a
 @code{<hg-reference>} object.  The output is expected to have recursive
 hash @var{hash} of type @var{hash-algo} (a symbol).  Use @var{name} as
 the file name, or a generic name if @code{#false}.
-@end deffn
+@end defun
 
 @node Defining Package Variants
 @section Defining Package Variants
@@ -8168,7 +8176,7 @@ from the @code{inputs} field of @code{gdb}.  The @code{modify-inputs}
 macro is a helper that can prove useful anytime you want to remove, add,
 or replace package inputs.
 
-@deffn {Scheme Syntax} modify-inputs @var{inputs} @var{clauses}
+@defmac modify-inputs inputs clauses
 Modify the given package inputs, as returned by @code{package-inputs} & co.,
 according to the given clauses.  Each clause must have one of the
 following forms:
@@ -8203,7 +8211,7 @@ The example below replaces the @code{guile} package from the inputs of
 
 The last type of clause is @code{append}, to add inputs at the back of
 the list.
-@end deffn
+@end defmac
 
 In some cases, you may find it useful to write functions
 (``procedures'', in Scheme parlance) that return a package based on some
@@ -8243,7 +8251,7 @@ These are pretty simple package variants.  As a convenience, the
 that directly maps to the more sophisticated package transformation
 options (@pxref{Package Transformation Options}):
 
-@deffn {Scheme Procedure} options->transformation @var{opts}
+@defun options->transformation opts
 Return a procedure that, when passed an object to build (package,
 derivation, etc.), applies the transformations specified by @var{opts} and returns
 the resulting objects.  @var{opts} must be a list of symbol/string pairs such as:
@@ -8255,7 +8263,7 @@ the resulting objects.  @var{opts} must be a list of symbol/string pairs such as
 
 Each symbol names a transformation and the corresponding string is an argument
 to that transformation.
-@end deffn
+@end defun
 
 For instance, a manifest equivalent to this command:
 
@@ -8294,8 +8302,7 @@ Dependency graph rewriting, for the purposes of swapping packages in the
 graph, is what the @code{package-input-rewriting} procedure in
 @code{(guix packages)} implements.
 
-@deffn {Scheme Procedure} package-input-rewriting @var{replacements} @
-           [@var{rewrite-name}] [#:deep? #t]
+@defun package-input-rewriting replacements [rewrite-name] [#:deep? #t]
 Return a procedure that, when passed a package, replaces its direct and
 indirect dependencies, including implicit inputs when @var{deep?} is
 true, according to @var{replacements}.  @var{replacements} is a list of
@@ -8304,7 +8311,7 @@ and the second one is the replacement.
 
 Optionally, @var{rewrite-name} is a one-argument procedure that takes
 the name of a package and returns its new name after rewrite.
-@end deffn
+@end defun
 
 @noindent
 Consider this example:
@@ -8332,10 +8339,13 @@ be replaced by name rather than by identity.
 @deffn {Scheme Procedure} package-input-rewriting/spec @var{replacements} [#:deep? #t]
 Return a procedure that, given a package, applies the given
 @var{replacements} to all the package graph, including implicit inputs
-unless @var{deep?} is false.  @var{replacements} is a list of
-spec/procedures pair; each spec is a package specification such as
-@code{"gcc"} or @code{"guile@@2"}, and each procedure takes a matching
-package and returns a replacement for that package.
+unless @var{deep?} is false.
+
+@var{replacements} is a list of spec/procedures pair; each spec is a
+package specification such as @code{"gcc"} or @code{"guile@@2"}, and
+each procedure takes a matching package and returns a replacement for
+that package.  Matching packages that have the @code{hidden?} property
+set are not replaced.
 @end deffn
 
 The example above could be rewritten this way:
@@ -8354,12 +8364,12 @@ A more generic procedure to rewrite a package dependency graph is
 @code{package-mapping}: it supports arbitrary changes to nodes in the
 graph.
 
-@deffn {Scheme Procedure} package-mapping @var{proc} [@var{cut?}] [#:deep? #f]
+@defun package-mapping proc [cut?] [#:deep? #f]
 Return a procedure that, given a package, applies @var{proc} to all the packages
 depended on and returns the resulting package.  The procedure stops recursion
 when @var{cut?} returns true for a given package.  When @var{deep?} is true, @var{proc} is
 applied to implicit inputs as well.
-@end deffn
+@end defun
 
 @node Writing Manifests
 @section Writing Manifests
@@ -8564,15 +8574,14 @@ related to a manifest entry coming from a @code{dependencies} field.
 @end table
 @end deftp
 
-@deffn {Scheme Procedure} concatenate-manifests @var{lst}
+@defun concatenate-manifests lst
 Concatenate the manifests listed in @var{lst} and return the resulting
 manifest.
-@end deffn
+@end defun
 
 @c TODO: <manifest-pattern>, manifest-lookup, manifest-remove, etc.
 
-@deffn {Scheme Procedure} package->manifest-entry @var{package} @
-  [@var{output}] [#:properties]
+@defun package->manifest-entry package [output] [#:properties]
 Return a manifest entry for the @var{output} of package @var{package},
 where @var{output} defaults to @code{"out"}, and with the given
 @var{properties}.  By default @var{properties} is the empty list or, if
@@ -8590,9 +8599,9 @@ output and the @code{send-email} output of the @code{git} package:
 (manifest (list (package->manifest-entry git)
                 (package->manifest-entry git "send-email")))
 @end lisp
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} packages->manifest @var{packages}
+@defun packages->manifest packages
 Return a list of manifest entries, one for each item listed in
 @var{packages}.  Elements of @var{packages} can be either package
 objects or package/string tuples denoting a specific output of a
@@ -8606,11 +8615,10 @@ concisely:
 
 (packages->manifest (list git `(,git "send-email")))
 @end lisp
-@end deffn
+@end defun
 
 @anchor{package-development-manifest}
-@deffn {Scheme Procedure} package->development-manifest @var{package} @
-  [@var{system}] [#:target]
+@defun package->development-manifest package [system] [#:target]
 Return a manifest for the @dfn{development inputs} of @var{package} for
 @var{system}, optionally when cross-compiling to @var{target}.
 Development inputs include both explicit and implicit inputs of
@@ -8638,7 +8646,7 @@ In this example, the development manifest that
 (GCC), the many supporting libraries (Boost, GLib, GTK, etc.), and a
 couple of additional development tools---these are the dependencies
 @command{guix show inkscape} lists.
-@end deffn
+@end defun
 
 @c TODO: Move (gnu packages) interface to a section of its own.
 
@@ -8646,7 +8654,7 @@ Last, the @code{(gnu packages)} module provides higher-level facilities
 to build manifests.  In particular, it lets you look up packages by
 name---see below.
 
-@deffn {Scheme Procedure} specifications->manifest @var{specs}
+@defun specifications->manifest specs
 Given @var{specs}, a list of specifications such as @code{"emacs@@25.2"}
 or @code{"guile:debug"}, return a manifest.  Specs have the format that
 command-line tools such as @command{guix install} and @command{guix
@@ -8663,7 +8671,7 @@ Notice that we do not need to worry about @code{use-modules}, importing
 the right set of modules, and referring to the right variables.
 Instead, we directly refer to packages in the same way as on the command
 line, which can often be more convenient.
-@end deffn
+@end defun
 
 @c TODO: specifications->package, etc.
 
@@ -9827,7 +9835,7 @@ be specified with the @code{#:node} parameter which defaults to
 @code{node}.
 @end defvar
 
-@defvr {Scheme Variable} tree-sitter-build-system
+@defvar tree-sitter-build-system
 
 This variable is exported by @code{(guix build-system tree-sitter)}.  It
 implements procedures to compile grammars for the
@@ -9844,7 +9852,7 @@ Grammars sometimes depend on each other, such as C++ depending on C and
 TypeScript depending on JavaScript.  You may use inputs to declare such
 dependencies.
 
-@end defvr
+@end defvar
 
 Lastly, for packages that do not need anything as sophisticated, a
 ``trivial'' build system is provided.  It is trivial in the sense that
@@ -10124,54 +10132,54 @@ procedures provided by @code{(guix build utils)}.
 
 This section documents procedures that deal with store file names.
 
-@deffn {Scheme Procedure} %store-directory
+@defun %store-directory
 Return the directory name of the store.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} store-file-name? @var{file}
+@defun store-file-name? file
 Return true if @var{file} is in the store.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} strip-store-file-name @var{file}
+@defun strip-store-file-name file
 Strip the @file{/gnu/store} and hash from @var{file}, a store file name.
 The result is typically a @code{"@var{package}-@var{version}"} string.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} package-name->name+version @var{name}
+@defun package-name->name+version name
 Given @var{name}, a package name like @code{"foo-0.9.1b"}, return two
 values: @code{"foo"} and @code{"0.9.1b"}.  When the version part is
 unavailable, @var{name} and @code{#f} are returned.  The first hyphen
 followed by a digit is considered to introduce the version part.
-@end deffn
+@end defun
 
 @subsection File Types
 
 The procedures below deal with files and file types.
 
-@deffn {Scheme Procedure} directory-exists? @var{dir}
+@defun directory-exists? dir
 Return @code{#t} if @var{dir} exists and is a directory.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} executable-file? @var{file}
+@defun executable-file? file
 Return @code{#t} if @var{file} exists and is executable.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} symbolic-link? @var{file}
+@defun symbolic-link? file
 Return @code{#t} if @var{file} is a symbolic link (aka. a ``symlink'').
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} elf-file? @var{file}
-@deffnx {Scheme Procedure} ar-file? @var{file}
-@deffnx {Scheme Procedure} gzip-file? @var{file}
+@defun elf-file? file
+@defunx ar-file? file
+@defunx gzip-file? file
 Return @code{#t} if @var{file} is, respectively, an ELF file, an
 @code{ar} archive (such as a @file{.a} static library), or a gzip file.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} reset-gzip-timestamp @var{file} [#:keep-mtime? #t]
+@defun reset-gzip-timestamp file [#:keep-mtime? #t]
 If @var{file} is a gzip file, reset its embedded timestamp (as with
 @command{gzip --no-name}) and return true.  Otherwise return @code{#f}.
 When @var{keep-mtime?} is true, preserve @var{file}'s modification time.
-@end deffn
+@end defun
 
 @subsection File Manipulation
 
@@ -10181,7 +10189,7 @@ such as @command{mkdir -p}, @command{cp -r}, @command{rm -r}, and
 @command{sed}.  They complement Guile's extensive, but low-level, file
 system interface (@pxref{POSIX,,, guile, GNU Guile Reference Manual}).
 
-@deffn {Scheme Syntax} with-directory-excursion @var{directory} @var{body}@dots{}
+@defmac with-directory-excursion directory body @dots{}
 Run @var{body} with @var{directory} as the process's current directory.
 
 Essentially, this macro changes the current directory to @var{directory}
@@ -10190,22 +10198,22 @@ guile, GNU Guile Reference Manual}).  It changes back to the initial
 directory when the dynamic extent of @var{body} is left, be it @i{via}
 normal procedure return or @i{via} a non-local exit such as an
 exception.
-@end deffn
+@end defmac
 
-@deffn {Scheme Procedure} mkdir-p @var{dir}
+@defun mkdir-p dir
 Create directory @var{dir} and all its ancestors.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} install-file @var{file} @var{directory}
+@defun install-file file directory
 Create @var{directory} if it does not exist and copy @var{file} in there
 under the same name.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} make-file-writable @var{file}
+@defun make-file-writable file
 Make @var{file} writable for its owner.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} copy-recursively @var{source} @var{destination} @
+@defun copy-recursively source destination @
   [#:log (current-output-port)] [#:follow-symlinks? #f] @
   [#:copy-file copy-file] [#:keep-mtime? #f] [#:keep-permissions? #t]
 Copy @var{source} directory to @var{destination}.  Follow symlinks if
@@ -10214,17 +10222,16 @@ Copy @var{source} directory to @var{destination}.  Follow symlinks if
 keep the modification time of the files in @var{source} on those of
 @var{destination}.  When @var{keep-permissions?} is true, preserve file
 permissions.  Write verbose output to the @var{log} port.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} delete-file-recursively @var{dir} @
-  [#:follow-mounts? #f]
+@defun delete-file-recursively dir [#:follow-mounts? #f]
 Delete @var{dir} recursively, like @command{rm -rf}, without following
 symlinks.  Don't follow mount points either, unless @var{follow-mounts?}
 is true.  Report but ignore errors.
-@end deffn
+@end defun
 
-@deffn {Scheme Syntax} substitute* @var{file} @
-  ((@var{regexp} @var{match-var}@dots{}) @var{body}@dots{}) @dots{}
+@defmac substitute* file @
+  ((regexp match-var@dots{}) body@dots{}) @dots{}
 Substitute @var{regexp} in @var{file} by the string returned by
 @var{body}.  @var{body} is evaluated with each @var{match-var} bound to
 the corresponding positional regexp sub-expression.  For example:
@@ -10250,19 +10257,19 @@ they are all subject to the substitutions.
 
 Be careful about using @code{$} to match the end of a line; by itself it
 won't match the terminating newline of a line.
-@end deffn
+@end defmac
 
 @subsection File Search
 
 @cindex file, searching
 This section documents procedures to search and filter files.
 
-@deffn {Scheme Procedure} file-name-predicate @var{regexp}
+@defun file-name-predicate regexp
 Return a predicate that returns true when passed a file name whose base
 name matches @var{regexp}.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} find-files @var{dir} [@var{pred}] @
+@defun find-files dir [pred] @
   [#:stat lstat] [#:directories? #f] [#:fail-on-error? #f]
 Return the lexicographically sorted list of files under @var{dir} for
 which @var{pred} returns true.  @var{pred} is passed two arguments: the
@@ -10273,7 +10280,7 @@ case it is equivalent to @code{(file-name-predicate @var{pred})}.
 that symlinks are not followed.  If @var{directories?} is true, then
 directories will also be included.  If @var{fail-on-error?} is true,
 raise an exception upon error.
-@end deffn
+@end defun
 
 Here are a few examples where we assume that the current directory is
 the root of the Guix source tree:
@@ -10292,13 +10299,13 @@ the root of the Guix source tree:
 @result{} ("./libformat.a" "./libstore.a" @dots{})
 @end lisp
 
-@deffn {Scheme Procedure} which @var{program}
+@defun which program
 Return the complete file name for @var{program} as found in
 @code{$PATH}, or @code{#f} if @var{program} could not be found.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} search-input-file @var{inputs} @var{name}
-@deffnx {Scheme Procedure} search-input-directory @var{inputs} @var{name}
+@defun search-input-file inputs name
+@defunx search-input-directory inputs name
 Return the complete file name for @var{name} as found in @var{inputs};
 @code{search-input-file} searches for a regular file and
 @code{search-input-directory} searches for a directory.  If @var{name}
@@ -10307,7 +10314,7 @@ could not be found, an exception is raised.
 Here, @var{inputs} must be an association list like @code{inputs} and
 @code{native-inputs} as available to build phases (@pxref{Build
 Phases}).
-@end deffn
+@end defun
 
 Here is a (simplified) example of how @code{search-input-file} is used
 in a build phase of the @code{wireguard-tools} package:
@@ -10330,7 +10337,7 @@ You'll find handy procedures to spawn processes in this module,
 essentially convenient wrappers around Guile's @code{system*}
 (@pxref{Processes, @code{system*},, guile, GNU Guile Reference Manual}).
 
-@deffn {Scheme Procedure} invoke @var{program} @var{args}@dots{}
+@defun invoke program args@dots{}
 Invoke @var{program} with the given @var{args}.  Raise an
 @code{&invoke-error} exception if the exit code is non-zero; otherwise
 return @code{#t}.
@@ -10338,21 +10345,21 @@ return @code{#t}.
 The advantage compared to @code{system*} is that you do not need to
 check the return value.  This reduces boilerplate in shell-script-like
 snippets for instance in package build phases.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} invoke-error? @var{c}
+@defun invoke-error? c
 Return true if @var{c} is an @code{&invoke-error} condition.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} invoke-error-program @var{c}
-@deffnx {Scheme Procedure} invoke-error-arguments @var{c}
-@deffnx {Scheme Procedure} invoke-error-exit-status @var{c}
-@deffnx {Scheme Procedure} invoke-error-term-signal @var{c}
-@deffnx {Scheme Procedure} invoke-error-stop-signal @var{c}
+@defun invoke-error-program c
+@defunx invoke-error-arguments c
+@defunx invoke-error-exit-status c
+@defunx invoke-error-term-signal c
+@defunx invoke-error-stop-signal c
 Access specific fields of @var{c}, an @code{&invoke-error} condition.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} report-invoke-error @var{c} [@var{port}]
+@defun report-invoke-error c [port]
 Report to @var{port} (by default the current error port) about @var{c},
 an @code{&invoke-error} condition, in a human-friendly way.
 
@@ -10368,9 +10375,9 @@ Typical usage would look like this:
 
 @print{} command "date" "--imaginary-option" failed with status 1
 @end lisp
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} invoke/quiet @var{program} @var{args}@dots{}
+@defun invoke/quiet program args@dots{}
 Invoke @var{program} with @var{args} and capture @var{program}'s
 standard output and standard error.  If @var{program} succeeds, print
 nothing and return the unspecified value; otherwise, raise a
@@ -10394,7 +10401,7 @@ Here's an example:
     date: unrecognized option '--imaginary-option'
     Try 'date --help' for more information.
 @end lisp
-@end deffn
+@end defun
 
 @subsection Build Phases
 
@@ -10411,7 +10418,7 @@ manipulate alists.  The @code{(guix build utils)} module complements
 those with tools written with build phases in mind.
 
 @cindex build phases, modifying
-@deffn {Scheme Syntax} modify-phases @var{phases} @var{clause}@dots{}
+@defmac modify-phases phases clause@dots{}
 Modify @var{phases} sequentially as per each @var{clause}, which may
 have one of the following forms:
 
@@ -10424,7 +10431,7 @@ have one of the following forms:
 
 Where every @var{phase-name} above is an expression evaluating to a
 symbol, and @var{new-phase} an expression evaluating to a procedure.
-@end deffn
+@end defmac
 
 The example below is taken from the definition of the @code{grep}
 package.  It adds a phase to run after the @code{install} phase, called
@@ -10504,8 +10511,7 @@ are always found.  The wrapper would be used to set @env{PATH},
 To ease that task, the @code{(guix build utils)} module provides a
 couple of helpers to wrap commands.
 
-@deffn {Scheme Procedure} wrap-program @var{program} @
-  [#:sh @var{sh}] [#:rest @var{variables}]
+@defun wrap-program program [#:sh sh] [#:rest variables]
 Make a wrapper for @var{program}.  @var{variables} should look like this:
 
 @lisp
@@ -10537,10 +10543,9 @@ exec -a $0 location/of/.foo-real "$@@"
 If @var{program} has previously been wrapped by @code{wrap-program}, the
 wrapper is extended with definitions for @var{variables}.  If it is not,
 @var{sh} will be used as the interpreter.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} wrap-script @var{program} @
-  [#:guile @var{guile}] [#:rest @var{variables}]
+@defun wrap-script program [#:guile guile] [#:rest variables]
 Wrap the script @var{program} such that @var{variables} are set first.
 The format of @var{variables} is the same as in the @code{wrap-program}
 procedure.  This procedure differs from @code{wrap-program} in that it
@@ -10553,7 +10558,7 @@ second line.
 
 Note that this procedure can only be used once per file as Guile scripts are
 not supported.
-@end deffn
+@end defun
 
 @node Search Paths
 @section Search Paths
@@ -10742,13 +10747,12 @@ How do you turn search path specifications on one hand and a bunch of
 directories on the other hand in a set of environment variable
 definitions?  That's the job of @code{evaluate-search-paths}.
 
-@deffn {Scheme Procedure} evaluate-search-paths @var{search-paths} @
-  @var{directories} [@var{getenv}]
+@defun evaluate-search-paths search-paths directories [getenv]
 Evaluate @var{search-paths}, a list of search-path specifications, for
 @var{directories}, a list of directory names, and return a list of
 specification/value pairs.  Use @var{getenv} to determine the current
 settings and report only settings not already effective.
-@end deffn
+@end defun
 
 The @code{(guix profiles)} provides a higher-level helper procedure,
 @code{load-profile}, that sets the environment variables of a profile.
@@ -10852,7 +10856,7 @@ share any problems or suggestions you may have (@pxref{Contributing}).
 @end quotation
 @end defvr
 
-@deffn {Scheme Procedure} open-connection [@var{uri}] [#:reserve-space? #t]
+@defun open-connection [uri] [#:reserve-space? #t]
 Connect to the daemon over the Unix-domain socket at @var{uri} (a string).  When
 @var{reserve-space?} is true, instruct it to reserve a little bit of
 extra space on the file system so that the garbage collector can still
@@ -10860,11 +10864,11 @@ operate should the disk become full.  Return a server object.
 
 @var{file} defaults to @code{%default-socket-path}, which is the normal
 location given the options that were passed to @command{configure}.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} close-connection @var{server}
+@defun close-connection server
 Close the connection to @var{server}.
-@end deffn
+@end defun
 
 @defvar current-build-output-port
 This variable is bound to a SRFI-39 parameter, which refers to the port
@@ -10874,8 +10878,8 @@ where build and error logs sent by the daemon should be written.
 Procedures that make RPCs all take a server object as their first
 argument.
 
-@deffn {Scheme Procedure} valid-path? @var{server} @var{path}
 @cindex invalid store items
+@defun valid-path? server path
 Return @code{#t} when @var{path} designates a valid store item and
 @code{#f} otherwise (an invalid item may exist on disk but still be
 invalid, for instance because it is the result of an aborted or failed
@@ -10883,20 +10887,19 @@ build).
 
 A @code{&store-protocol-error} condition is raised if @var{path} is not
 prefixed by the store directory (@file{/gnu/store}).
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} add-text-to-store @var{server} @var{name} @var{text} [@var{references}]
+@defun add-text-to-store server name text [references]
 Add @var{text} under file @var{name} in the store, and return its store
 path.  @var{references} is the list of store paths referred to by the
 resulting store path.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} build-derivations @var{store} @var{derivations} @
-  [@var{mode}]
+@defun build-derivations store derivations [mode]
 Build @var{derivations}, a list of @code{<derivation>} objects, @file{.drv}
 file names, or derivation/output pairs, using the specified
 @var{mode}---@code{(build-mode normal)} by default.
-@end deffn
+@end defun
 
 Note that the @code{(guix monads)} module provides a monad as well as
 monadic versions of the above procedures, with the goal of making it
@@ -10970,8 +10973,8 @@ derivations as Scheme objects, along with procedures to create and
 otherwise manipulate derivations.  The lowest-level primitive to create
 a derivation is the @code{derivation} procedure:
 
-@deffn {Scheme Procedure} derivation @var{store} @var{name} @var{builder} @
-  @var{args} [#:outputs '("out")] [#:hash #f] [#:hash-algo #f] @
+@defun derivation store name builder args @
+  [#:outputs '("out")] [#:hash #f] [#:hash-algo #f] @
   [#:recursive? #f] [#:inputs '()] [#:env-vars '()] @
   [#:system (%current-system)] [#:references-graphs #f] @
   [#:allowed-references #f] [#:disallowed-references #f] @
@@ -11016,7 +11019,7 @@ host CPU instruction set.
 
 @var{properties} must be an association list describing ``properties'' of the
 derivation.  It is kept as-is, uninterpreted, in the derivation.
-@end deffn
+@end defun
 
 @noindent
 Here's an example with a shell script as its builder, assuming
@@ -11049,8 +11052,7 @@ derivations with build code written in Scheme was achieved with
 @code{build-expression->derivation}, documented below.  This procedure
 is now deprecated in favor of the much nicer @code{gexp->derivation}.
 
-@deffn {Scheme Procedure} build-expression->derivation @var{store} @
-       @var{name} @var{exp} @
+@defun build-expression->derivation store name exp @
        [#:system (%current-system)] [#:inputs '()] @
        [#:outputs '("out")] [#:hash #f] [#:hash-algo #f] @
        [#:recursive? #f] [#:env-vars '()] [#:modules '()] @
@@ -11082,7 +11084,7 @@ See the @code{derivation} procedure for the meaning of
 @var{references-graphs}, @var{allowed-references},
 @var{disallowed-references}, @var{local-build?}, and
 @var{substitutable?}.
-@end deffn
+@end defun
 
 @noindent
 Here's an example of a single-output derivation that creates a directory
@@ -11216,16 +11218,16 @@ build a file-like object (@pxref{Using Guix Interactively}).
 The main syntactic forms to deal with monads in general are provided by
 the @code{(guix monads)} module and are described below.
 
-@deffn {Scheme Syntax} with-monad @var{monad} @var{body} ...
+@defmac with-monad monad body @dots{}
 Evaluate any @code{>>=} or @code{return} forms in @var{body} as being
 in @var{monad}.
-@end deffn
+@end defmac
 
-@deffn {Scheme Syntax} return @var{val}
+@defmac return val
 Return a monadic value that encapsulates @var{val}.
-@end deffn
+@end defmac
 
-@deffn {Scheme Syntax} >>= @var{mval} @var{mproc} ...
+@defmac >>= mval mproc @dots{}
 @dfn{Bind} monadic value @var{mval}, passing its ``contents'' to monadic
 procedures @var{mproc}@dots{}@footnote{This operation is commonly
 referred to as ``bind'', but that name denotes an unrelated procedure in
@@ -11244,12 +11246,10 @@ in this example:
 @result{} 4
 @result{} some-state
 @end lisp
-@end deffn
+@end defmac
 
-@deffn {Scheme Syntax} mlet @var{monad} ((@var{var} @var{mval}) ...) @
-       @var{body} ...
-@deffnx {Scheme Syntax} mlet* @var{monad} ((@var{var} @var{mval}) ...) @
-       @var{body} ...
+@defmac mlet monad ((var mval) @dots{}) body @dots{}
+@defmacx mlet* monad ((var mval) @dots{}) body @dots{}
 Bind the variables @var{var} to the monadic values @var{mval} in
 @var{body}, which is a sequence of expressions.  As with the bind
 operator, this can be thought of as ``unpacking'' the raw, non-monadic
@@ -11263,9 +11263,9 @@ expression, and its result will become the result of the @code{mlet} or
 
 @code{mlet*} is to @code{mlet} what @code{let*} is to @code{let}
 (@pxref{Local Bindings,,, guile, GNU Guile Reference Manual}).
-@end deffn
+@end defmac
 
-@deffn {Scheme System} mbegin @var{monad} @var{mexp} ...
+@defmac mbegin monad mexp @dots{}
 Bind @var{mexp} and the following monadic expressions in sequence,
 returning the result of the last expression.  Every expression in the
 sequence must be a monadic expression.
@@ -11273,21 +11273,21 @@ sequence must be a monadic expression.
 This is akin to @code{mlet}, except that the return values of the
 monadic expressions are ignored.  In that sense, it is analogous to
 @code{begin}, but applied to monadic expressions.
-@end deffn
+@end defmac
 
-@deffn {Scheme System} mwhen @var{condition} @var{mexp0} @var{mexp*} ...
+@defmac mwhen condition mexp0 mexp* @dots{}
 When @var{condition} is true, evaluate the sequence of monadic
 expressions @var{mexp0}..@var{mexp*} as in an @code{mbegin}.  When
 @var{condition} is false, return @code{*unspecified*} in the current
 monad.  Every expression in the sequence must be a monadic expression.
-@end deffn
+@end defmac
 
-@deffn {Scheme System} munless @var{condition} @var{mexp0} @var{mexp*} ...
+@defmac munless condition mexp0 mexp* @dots{}
 When @var{condition} is false, evaluate the sequence of monadic
 expressions @var{mexp0}..@var{mexp*} as in an @code{mbegin}.  When
 @var{condition} is true, return @code{*unspecified*} in the current
 monad.  Every expression in the sequence must be a monadic expression.
-@end deffn
+@end defmac
 
 @cindex state monad
 The @code{(guix monads)} module provides the @dfn{state monad}, which
@@ -11337,10 +11337,10 @@ Pop a value from the current state and return it as a monadic value.
 The state is assumed to be a list.
 @end deffn
 
-@deffn {Scheme Procedure} run-with-state @var{mval} [@var{state}]
+@defun run-with-state mval [state]
 Run monadic value @var{mval} starting with @var{state} as the initial
 state.  Return two values: the resulting value, and the resulting state.
-@end deffn
+@end defun
 
 The main interface to the store monad, provided by the @code{(guix
 store)} module, is as follows.
@@ -11353,10 +11353,11 @@ effect is needed, a value of the store monad must be ``evaluated'' by
 passing it to the @code{run-with-store} procedure (see below).
 @end defvar
 
-@deffn {Scheme Procedure} run-with-store @var{store} @var{mval} [#:guile-for-build] [#:system (%current-system)]
+@defun run-with-store store mval @
+  [#:guile-for-build] [#:system (%current-system)]
 Run @var{mval}, a monadic value in the store monad, in @var{store}, an
 open store connection.
-@end deffn
+@end defun
 
 @deffn {Monadic Procedure} text-file @var{name} @var{text} [@var{references}]
 Return as a monadic value the absolute file name in the store of the file
@@ -11607,8 +11608,8 @@ package available on the build side, here's how you would do it:
 
 The syntactic form to construct gexps is summarized below.
 
-@deffn {Scheme Syntax} #~@var{exp}
-@deffnx {Scheme Syntax} (gexp @var{exp})
+@defmac #~@var{exp}
+@defmacx (gexp @var{exp})
 Return a G-expression containing @var{exp}.  @var{exp} may contain one
 or more of the following forms:
 
@@ -11662,9 +11663,9 @@ Like the above, but refers to native builds of the objects listed in
 
 G-expressions created by @code{gexp} or @code{#~} are run-time objects
 of the @code{gexp?} type (see below).
-@end deffn
+@end defmac
 
-@deffn {Scheme Syntax} with-imported-modules @var{modules} @var{body}@dots{}
+@defmac with-imported-modules modules body@dots{}
 Mark the gexps defined in @var{body}@dots{} as requiring @var{modules}
 in their execution environment.
 
@@ -11686,9 +11687,9 @@ path, and the last one is created from the given file-like object.
 This form has @emph{lexical} scope: it has an effect on the gexps
 directly defined in @var{body}@dots{}, but not on those defined, say, in
 procedures called from @var{body}@dots{}.
-@end deffn
+@end defmac
 
-@deffn {Scheme Syntax} with-extensions @var{extensions} @var{body}@dots{}
+@defmac with-extensions extensions body@dots{}
 Mark the gexps defined in @var{body}@dots{} as requiring
 @var{extensions} in their build and execution environment.
 @var{extensions} is typically a list of package objects such as those
@@ -11698,11 +11699,11 @@ Concretely, the packages listed in @var{extensions} are added to the
 load path while compiling imported modules in @var{body}@dots{}; they
 are also added to the load path of the gexp returned by
 @var{body}@dots{}.
-@end deffn
+@end defmac
 
-@deffn {Scheme Procedure} gexp? @var{obj}
+@defun gexp? obj
 Return @code{#t} if @var{obj} is a G-expression.
-@end deffn
+@end defun
 
 G-expressions are meant to be written to disk, either as code building
 some derivation, or as plain files in the store.  The monadic procedures
@@ -11789,8 +11790,7 @@ does not have any effect on what the G-expression does.
 @code{plain-file} can be used similarly; it differs in that the file
 content is directly passed as a string.
 
-@deffn {Scheme Procedure} local-file @var{file} [@var{name}] @
-   [#:recursive? #f] [#:select? (const #t)]
+@defun local-file file [name] [#:recursive? #f] [#:select? (const #t)]
 Return an object representing local file @var{file} to add to the store;
 this object can be used in a gexp.  If @var{file} is a literal string
 denoting a relative file name, it is looked up relative to the source
@@ -11810,24 +11810,23 @@ entries for which @var{select?} does not return true.
 
 This is the declarative counterpart of the @code{interned-file} monadic
 procedure (@pxref{The Store Monad, @code{interned-file}}).
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} plain-file @var{name} @var{content}
+@defun plain-file name content
 Return an object representing a text file called @var{name} with the given
 @var{content} (a string or a bytevector) to be added to the store.
 
 This is the declarative counterpart of @code{text-file}.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} computed-file @var{name} @var{gexp} @
-  [#:local-build? #t] [#:options '()]
+@defun computed-file name gexp [#:local-build? #t] [#:options '()]
 Return an object representing the store item @var{name}, a file or
 directory computed by @var{gexp}.  When @var{local-build?} is true (the
 default), the derivation is built locally.  @var{options} is a list of
 additional arguments to pass to @code{gexp->derivation}.
 
 This is the declarative counterpart of @code{gexp->derivation}.
-@end deffn
+@end defun
 
 @deffn {Monadic Procedure} gexp->script @var{name} @var{exp} @
   [#:guile (default-guile)] [#:module-path %load-path] @
@@ -11858,14 +11857,13 @@ executable file @file{/gnu/store/@dots{}-list-files} along these lines:
 @end example
 @end deffn
 
-@deffn {Scheme Procedure} program-file @var{name} @var{exp} @
-          [#:guile #f] [#:module-path %load-path]
+@defun program-file name exp [#:guile #f] [#:module-path %load-path]
 Return an object representing the executable store item @var{name} that
 runs @var{gexp}.  @var{guile} is the Guile package used to execute that
 script.  Imported modules of @var{gexp} are looked up in @var{module-path}.
 
 This is the declarative counterpart of @code{gexp->script}.
-@end deffn
+@end defun
 
 @deffn {Monadic Procedure} gexp->file @var{name} @var{exp} @
             [#:set-load-path? #t] [#:module-path %load-path] @
@@ -11884,13 +11882,12 @@ The resulting file holds references to all the dependencies of @var{exp}
 or a subset thereof.
 @end deffn
 
-@deffn {Scheme Procedure} scheme-file @var{name} @var{exp} @
-          [#:splice? #f] [#:set-load-path? #t]
+@defun scheme-file name exp [#:splice? #f] [#:set-load-path? #t]
 Return an object representing the Scheme file @var{name} that contains
 @var{exp}.
 
 This is the declarative counterpart of @code{gexp->file}.
-@end deffn
+@end defun
 
 @deffn {Monadic Procedure} text-file* @var{name} @var{text} @dots{}
 Return as a monadic value a derivation that builds a text file
@@ -11918,7 +11915,7 @@ will reference @var{coreutils}, @var{grep}, and @var{sed}, thereby
 preventing them from being garbage-collected during its lifetime.
 @end deffn
 
-@deffn {Scheme Procedure} mixed-text-file @var{name} @var{text} @dots{}
+@defun mixed-text-file name text @dots{}
 Return an object representing store file @var{name} containing
 @var{text}.  @var{text} is a sequence of strings and file-like objects,
 as in:
@@ -11929,9 +11926,9 @@ as in:
 @end lisp
 
 This is the declarative counterpart of @code{text-file*}.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} file-union @var{name} @var{files}
+@defun file-union name files
 Return a @code{<computed-file>} that builds a directory containing all of @var{files}.
 Each item in @var{files} must be a two-element list where the first element is the
 file name to use in the new directory, and the second element is a gexp
@@ -11946,9 +11943,9 @@ denoting the target file.  Here's an example:
 @end lisp
 
 This yields an @code{etc} directory containing these two files.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} directory-union @var{name} @var{things}
+@defun directory-union name things
 Return a directory that is the union of @var{things}, where @var{things} is a list of
 file-like objects denoting directories.  For example:
 
@@ -11957,9 +11954,9 @@ file-like objects denoting directories.  For example:
 @end lisp
 
 yields a directory that is the union of the @code{guile} and @code{emacs} packages.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} file-append @var{obj} @var{suffix} @dots{}
+@defun file-append obj suffix @dots{}
 Return a file-like object that expands to the concatenation of @var{obj}
 and @var{suffix}, where @var{obj} is a lowerable object and each
 @var{suffix} is a string.
@@ -11984,10 +11981,10 @@ There is one difference though: in the @code{file-append} case, the
 resulting script contains the absolute file name as a string, whereas in
 the second case, the resulting script contains a @code{(string-append
 @dots{})} expression to construct the file name @emph{at run time}.
-@end deffn
+@end defun
 
-@deffn {Scheme Syntax} let-system @var{system} @var{body}@dots{}
-@deffnx {Scheme Syntax} let-system (@var{system} @var{target}) @var{body}@dots{}
+@defmac let-system system body@dots{}
+@defmacx let-system (system target) body@dots{}
 Bind @var{system} to the currently targeted system---e.g.,
 @code{"x86_64-linux"}---within @var{body}.
 
@@ -12010,9 +12007,9 @@ spliced into the gexp depends on the target system, as in this example:
               (error "dunno!"))))
    "-net" "user" #$image)
 @end lisp
-@end deffn
+@end defmac
 
-@deffn {Scheme Syntax} with-parameters ((@var{parameter} @var{value}) @dots{}) @var{exp}
+@defmac with-parameters ((parameter value) @dots{}) exp
 This macro is similar to the @code{parameterize} form for
 dynamically-bound @dfn{parameters} (@pxref{Parameters,,, guile, GNU
 Guile Reference Manual}).  The key difference is that it takes effect
@@ -12029,7 +12026,7 @@ for a given object:
 
 The example above returns an object that corresponds to the i686 build
 of Coreutils, regardless of the current value of @code{%current-system}.
-@end deffn
+@end defmac
 
 
 Of course, in addition to gexps embedded in ``host'' code, there are
@@ -12051,7 +12048,7 @@ corresponding to @var{obj} for @var{system}, cross-compiling for
 has an associated gexp compiler, such as a @code{<package>}.
 @end deffn
 
-@deffn {Procedure} gexp->approximate-sexp @var{gexp}
+@defun gexp->approximate-sexp gexp
 Sometimes, it may be useful to convert a G-exp into a S-exp.  For
 example, some linters (@pxref{Invoking guix lint}) peek into the build
 phases of a package to detect potential problems.  This conversion can
@@ -12059,7 +12056,7 @@ be achieved with this procedure.  However, some information can be lost
 in the process.  More specifically, lowerable objects will be silently
 replaced with some arbitrary object -- currently the list
 @code{(*approximate*)}, but this may change.
-@end deffn
+@end defun
 
 @node Invoking guix repl
 @section Invoking @command{guix repl}
@@ -12674,18 +12671,18 @@ or @code{guile@@1.8}.
 
 For instance, the following command builds Guix, but replaces its
 dependency on the current stable version of Guile with a dependency on
-the legacy version of Guile, @code{guile@@2.0}:
+the legacy version of Guile, @code{guile@@2.2}:
 
 @example
-guix build --with-input=guile=guile@@2.0 guix
+guix build --with-input=guile=guile@@2.2 guix
 @end example
 
 This is a recursive, deep replacement.  So in this example, both
 @code{guix} and its dependency @code{guile-json} (which also depends on
-@code{guile}) get rebuilt against @code{guile@@2.0}.
+@code{guile}) get rebuilt against @code{guile@@2.2}.
 
-This is implemented using the @code{package-input-rewriting} Scheme
-procedure (@pxref{Defining Packages, @code{package-input-rewriting}}).
+This is implemented using the @code{package-input-rewriting/spec} Scheme
+procedure (@pxref{Defining Packages, @code{package-input-rewriting/spec}}).
 
 @item --with-graft=@var{package}=@var{replacement}
 This is similar to @option{--with-input} but with an important difference:
@@ -16649,12 +16646,14 @@ details.
 @item @code{services} (default: @code{%base-services})
 A list of service objects denoting system services.  @xref{Services}.
 
+@anchor{operating-system-essential-services}
 @cindex essential services
 @item @code{essential-services} (default: ...)
 The list of ``essential services''---i.e., things like instances of
-@code{system-service-type} and @code{host-name-service-type} (@pxref{Service
-Reference}), which are derived from the operating system definition itself.
-As a user you should @emph{never} need to touch this field.
+@code{system-service-type} (@pxref{Service Reference}) and
+@code{host-name-service-type}, which are derived from the operating
+system definition itself.  As a user you should @emph{never} need to
+touch this field.
 
 @item @code{pam-services} (default: @code{(base-pam-services)})
 @cindex PAM
@@ -16678,7 +16677,7 @@ is that only @code{root} and members of the @code{wheel} group may use
 
 @end table
 
-@deffn {Scheme Syntax} this-operating-system
+@defmac this-operating-system
 When used in the @emph{lexical scope} of an operating system field definition,
 this identifier resolves to the operating system being defined.
 
@@ -16696,7 +16695,7 @@ the definition of the @code{label} field:
 
 It is an error to refer to @code{this-operating-system} outside an operating
 system definition.
-@end deffn
+@end defmac
 
 @end deftp
 
@@ -16873,7 +16872,7 @@ example for an encrypted partition (@pxref{Mapped Devices}).
 @end table
 @end deftp
 
-@deffn {Scheme Procedure} file-system-label @var{str}
+@defun file-system-label str
 This procedure returns an opaque file system label from @var{str}, a
 string:
 
@@ -16884,7 +16883,7 @@ string:
 
 File system labels are used to refer to file systems by label rather
 than by device name.  See above for examples.
-@end deffn
+@end defun
 
 The @code{(gnu system file-systems)} exports the following useful
 variables.
@@ -16935,7 +16934,7 @@ and unmount user-space FUSE file systems.  This requires the
 The @code{(gnu system uuid)} module provides tools to deal with file
 system ``unique identifiers'' (UUIDs).
 
-@deffn {Scheme Procedure} uuid @var{str} [@var{type}]
+@defun uuid str [type]
 Return an opaque UUID (unique identifier) object of the given @var{type}
 (a symbol) by parsing @var{str} (a string):
 
@@ -16952,7 +16951,7 @@ Return an opaque UUID (unique identifier) object of the given @var{type}
 
 UUIDs are another way to unambiguously refer to file systems in
 operating system configuration.  See the examples above.
-@end deffn
+@end defun
 
 
 @node Btrfs file system
@@ -17615,14 +17614,13 @@ optional variant name, an optional keyboard model name, and a possibly empty
 list of additional options.  In most cases the layout name is all you care
 about.
 
-@deffn {Scheme Procedure} keyboard-layout @var{name} [@var{variant}] @
-                [#:model] [#:options '()]
+@defun keyboard-layout name [variant] [#:model] [#:options '()]
 Return a new keyboard layout with the given @var{name} and @var{variant}.
 
 @var{name} must be a string such as @code{"fr"}; @var{variant} must be a
 string such as @code{"bepo"} or @code{"nodeadkeys"}.  See the
 @code{xkeyboard-config} package for valid options.
-@end deffn
+@end defun
 
 Here are a few examples:
 
@@ -18014,7 +18012,7 @@ to add a special file is @i{via} the @code{extra-special-file} procedure
 (see below).
 @end defvar
 
-@deffn {Scheme Procedure} extra-special-file @var{file} @var{target}
+@defun extra-special-file file target
 Use @var{target} as the ``special file'' @var{file}.
 
 For example, adding the following lines to the @code{services} field of
@@ -18025,11 +18023,13 @@ symlink:
 (extra-special-file "/usr/bin/env"
                     (file-append coreutils "/bin/env"))
 @end lisp
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} host-name-service @var{name}
-Return a service that sets the host name to @var{name}.
-@end deffn
+@defvar host-name-service-type
+Type of the service that sets the system host name, whose value
+is a string. This service is included in @code{operating-system} by
+default (@pxref{operating-system-essential-services,@code{essential-services}}).
+@end defvar
 
 @defvar console-font-service-type
 Install the given fonts on the specified ttys (fonts are per
@@ -18106,14 +18106,14 @@ Return a new record for the host at @var{address} with the given
 host names.
 @end defun
 
-@deffn {Scheme Procedure} login-service @var{config}
-Return a service to run login according to @var{config}, a
-@code{<login-configuration>} object, which specifies the message of the day,
-among other things.
-@end deffn
+@defvar login-service-type
+Type of the service that provides a console login service, whose value
+is a @code{<login-configuration>} object.
+@end defvar
 
 @deftp {Data Type} login-configuration
-This is the data type representing the configuration of login.
+Data type representing the configuration of login, which specifies the
+@acronym{MOTD, message of the day}, among other things.
 
 @table @asis
 
@@ -18128,18 +18128,17 @@ the 'root' account has just been created.
 @end table
 @end deftp
 
-@deffn {Scheme Procedure} mingetty-service @var{config}
-Return a service to run mingetty according to @var{config}, a
-@code{<mingetty-configuration>} object, which specifies the tty to run, among
-other things.
-@end deffn
+@defvar mingetty-service-type
+Type of the service that runs Mingetty, an implementation of the
+virtual console log-in.  The value for this service is a
+@code{<mingetty-configuration>} object.
+@end defvar
 
 @deftp {Data Type} mingetty-configuration
-This is the data type representing the configuration of Mingetty, which
-provides the default implementation of virtual console log-in.
+Data type representing the configuration of Mingetty, which specifies
+the tty to run, among other things.
 
 @table @asis
-
 @item @code{tty}
 The name of the console this Mingetty runs on---e.g., @code{"tty1"}.
 
@@ -18166,19 +18165,18 @@ The Mingetty package to use.
 @end table
 @end deftp
 
-@deffn {Scheme Procedure} agetty-service @var{config}
-Return a service to run agetty according to @var{config}, an
-@code{<agetty-configuration>} object, which specifies the tty to run,
-among other things.
-@end deffn
+@defvar agetty-service-type
+Type of the service that runs agetty, which implements virtual and
+serial console log-in.  The value for this service is a
+@code{<agetty-configuration>} object.
+@end defvar
 
 @deftp {Data Type} agetty-configuration
-This is the data type representing the configuration of agetty, which
-implements virtual and serial console log-in.  See the @code{agetty(8)}
-man page for more information.
+Data type representing the configuration of agetty, which specifies the
+tty to run, among other things@footnote{See the @code{agetty(8)}
+man page for more information.}.
 
 @table @asis
-
 @item @code{tty}
 The name of the console this agetty runs on, as a string---e.g.,
 @code{"ttyS0"}.  This argument is optional, it will default to
@@ -18349,18 +18347,17 @@ The option can be used to provides extra shepherd requirements (for example
 @end table
 @end deftp
 
-@deffn {Scheme Procedure} kmscon-service-type @var{config}
-Return a service to run @uref{https://www.freedesktop.org/wiki/Software/kmscon,kmscon}
-according to @var{config}, a @code{<kmscon-configuration>} object, which
-specifies the tty to run, among other things.
-@end deffn
+@defvar kmscon-service-type
+Type of the service that runs @uref{https://www.freedesktop.org/wiki/Software/kmscon,kmscon},
+which implements virtual console log-in.  The value for this service is a
+@code{<kmscon-configuration>} object.
+@end defvar
 
 @deftp {Data Type} kmscon-configuration
-This is the data type representing the configuration of Kmscon, which
-implements virtual console log-in.
+Data type representing the configuration of Kmscon, which specifies the
+tty to run, among other things.
 
 @table @asis
-
 @item @code{virtual-terminal}
 The name of the console this Kmscon runs on---e.g., @code{"tty1"}.
 
@@ -18398,20 +18395,17 @@ The Kmscon package to use.
 @end table
 @end deftp
 
-@cindex name service cache daemon
-@cindex nscd
-@deffn {Scheme Procedure} nscd-service [@var{config}] [#:glibc glibc] @
-                [#:name-services '()]
-Return a service that runs the libc name service cache daemon (nscd) with the
-given @var{config}---an @code{<nscd-configuration>} object.  @xref{Name
-Service Switch}, for an example.
+@cindex @abbr{nscd, name service cache daemon}
+@defvar nscd-service-type
+Type of the service that runs the libc @abbr{nscd, name service cache
+daemon}, whose value is a @code{<nscd-configuration>} object.
 
 For convenience, the Shepherd service for nscd provides the following actions:
 
 @table @code
 @item invalidate
-@cindex cache invalidation, nscd
 @cindex nscd, cache invalidation
+@cindex cache invalidation, nscd
 This invalidate the given cache.  For instance, running:
 
 @example
@@ -18425,17 +18419,10 @@ invalidates the host name lookup cache of nscd.
 Running @command{herd statistics nscd} displays information about nscd usage
 and caches.
 @end table
-
-@end deffn
-
-@defvar %nscd-default-configuration
-This is the default @code{<nscd-configuration>} value (see below) used
-by @code{nscd-service}.  It uses the caches defined by
-@code{%nscd-default-caches}; see below.
 @end defvar
 
 @deftp {Data Type} nscd-configuration
-This is the data type representing the name service cache daemon (nscd)
+Data type representing the @abbr{nscd, name service cache daemon}
 configuration.
 
 @table @asis
@@ -18513,11 +18500,15 @@ privacy---often the result of host name lookups is in local cache, so
 external name servers do not even need to be queried.
 @end defvar
 
-@anchor{syslog-configuration-type}
 @cindex syslog
 @cindex logging
+@defvar syslog-service-type
+Type of the service that runs the syslog daemon, whose value is a
+@code{<syslog-configuration>} object.
+@end defvar
+
 @deftp {Data Type} syslog-configuration
-This data type represents the configuration of the syslog daemon.
+Data type representing the configuration of the syslog daemon.
 
 @table @asis
 @item @code{syslogd} (default: @code{#~(string-append #$inetutils "/libexec/syslogd")})
@@ -18525,19 +18516,12 @@ The syslog daemon to use.
 
 @item @code{config-file} (default: @code{%default-syslog.conf})
 The syslog configuration file to use.
+@xref{syslogd invocation,,, inetutils, GNU Inetutils}, for more
+information on the configuration file syntax.
 
 @end table
 @end deftp
 
-@anchor{syslog-service}
-@cindex syslog
-@deffn {Scheme Procedure} syslog-service @var{config}
-Return a service that runs a syslog daemon according to @var{config}.
-
-@xref{syslogd invocation,,, inetutils, GNU Inetutils}, for more
-information on the configuration file syntax.
-@end deffn
-
 @defvar guix-service-type
 This is the type of the service that runs the build daemon,
 @command{guix-daemon} (@pxref{Invoking guix-daemon}).  Its value must be a
@@ -18697,15 +18681,30 @@ A list of file-like objects or strings pointing to additional directories the bu
 @end table
 @end deftp
 
-@deffn {Scheme Procedure} udev-service [#:udev @var{eudev} #:rules @code{'()}]
-Run @var{udev}, which populates the @file{/dev} directory dynamically.
-udev rules can be provided as a list of files through the @var{rules}
-variable.  The procedures @code{udev-rule}, @code{udev-rules-service}
-and @code{file->udev-rule} from @code{(gnu services base)} simplify the
-creation of such rule files.
-@end deffn
+@defvar udev-service-type
+Type of the service that runs udev, a service which populates the
+@file{/dev} directory dynamically, whose value is a
+@code{<udev-configuration>} object.
 
-@deffn {Scheme Procedure} udev-rule [@var{file-name} @var{contents}]
+This service type can be @emph{extended} using procedures
+@code{udev-rules-service} along with @code{file->udev-rule} or
+@code{udev-rule} which simplify the process of writing udev rules.
+@end defvar
+
+@deftp {Data Type} udev-configuration
+Data type representing the configuration of udev.
+
+@table @asis
+@item @code{udev} (default: @code{eudev}) (type: file-like)
+Package object of the udev service.
+
+@item @code{rules} (default: @var{'()}) (type: list-of-file-like)
+List of file-like objects denoting udev-rule files.
+
+@end table
+@end deftp
+
+@defun udev-rule @var{file-name} @var{contents}
 Return a udev-rule file named @var{file-name} containing the rules
 defined by the @var{contents} literal.
 
@@ -18721,18 +18720,17 @@ upon detecting a USB device with a given product identifier.
                    "ATTR@{product@}==\"Example\", "
                    "RUN+=\"/path/to/script\"")))
 @end lisp
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} udev-rules-service [@var{name} @var{rules}] @
-               [#:groups @var{groups}]
-Return a service that extends @code{udev-service-type } with @var{rules}
+@defun udev-rules-service @var{name} @var{rules} [#:groups '()]
+Return a service that extends @code{udev-service-type} with @var{rules}
 and @code{account-service-type} with @var{groups} as system groups.
 This works by creating a singleton service type
 @code{@var{name}-udev-rules}, of which the returned service is an
 instance.
 
-Here we show how it can be used to extend @code{udev-service-type} with the
-previously defined rule @code{%example-udev-rule}.
+Here we show how it can be used to extend @code{udev-service-type}
+with the previously defined rule @code{%example-udev-rule}.
 
 @lisp
 (operating-system
@@ -18741,11 +18739,11 @@ previously defined rule @code{%example-udev-rule}.
    (cons (udev-rules-service 'usb-thing %example-udev-rule)
          %desktop-services)))
 @end lisp
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} file->udev-rule [@var{file-name} @var{file}]
-Return a udev file named @var{file-name} containing the rules defined
-within @var{file}, a file-like object.
+@defun file->udev-rule @var{file-name} @var{file}
+Return a udev-rule file named @var{file-name} containing the rules
+defined within @var{file}, a file-like object.
 
 The following example showcases how we can use an existing rule file.
 
@@ -18765,7 +18763,7 @@ The following example showcases how we can use an existing rule file.
        (sha256
         (base32 "0lmmagpyb6xsq6zcr2w1cyx9qmjqmajkvrdbhjx32gqf1d9is003"))))))
 @end lisp
-@end deffn
+@end defun
 
 Additionally, Guix package definitions can be included in @var{rules} in
 order to extend the udev rules with the definitions found under their
@@ -18927,13 +18925,24 @@ seconds for the negative lookups.  @xref{Invoking guix publish,
 @end table
 @end deftp
 
-@anchor{rngd-service}
-@deffn {Scheme Procedure} rngd-service [#:rng-tools @var{rng-tools}] @
-            [#:device "/dev/hwrng"]
-Return a service that runs the @command{rngd} program from @var{rng-tools}
-to add @var{device} to the kernel's entropy pool.  The service will fail if
-@var{device} does not exist.
-@end deffn
+@defvar rngd-service-type
+Type of the service that runs rng-tools rngd, whose value is a
+@code{<rngd-configuration>} object.
+@end defvar
+
+@deftp {Data Type} rngd-configuration
+Data type representing the configuration of rngd.
+
+@table @asis
+@item @code{rng-tools} (default: @code{rng-tools}) (type: file-like)
+Package object of the rng-tools rngd.
+
+@item @code{device} (default: @var{"/dev/hwrng"}) (type: string)
+Path of the device to add to the kernel's entropy pool.  The service
+will fail if @var{device} does not exist.
+
+@end table
+@end deftp
 
 @anchor{pam-limits-service}
 @cindex session limits
@@ -19833,6 +19842,12 @@ Data type representing the configuration of NetworkManager.
 @item @code{network-manager} (default: @code{network-manager})
 The NetworkManager package to use.
 
+@item @code{shepherd-requirement} (default: @code{'(wpa-supplicant)})
+This option can be used to provide a list of symbols naming Shepherd services
+that this service will depend on, such as @code{'wpa-supplicant} or
+@code{'iwd} if you require authenticated access for encrypted WiFi or Ethernet
+networks.
+
 @item @code{dns} (default: @code{"default"})
 Processing mode for DNS, which affects how NetworkManager uses the
 @code{resolv.conf} configuration file.
@@ -19881,10 +19896,6 @@ This is the list of available plugins for virtual private networks
 (VPNs).  An example of this is the @code{network-manager-openvpn}
 package, which allows NetworkManager to manage VPNs @i{via} OpenVPN.
 
-@item @code{iwd?} (default: @code{#f})
-NetworkManager will use iwd as a backend for wireless networking if this
-option is set to @code{#t}, otherwise it will use wpa-supplicant.
-
 @end table
 @end deftp
 
@@ -19912,11 +19923,15 @@ Data Type representing the configuration of connman.
 @item @code{connman} (default: @var{connman})
 The connman package to use.
 
+@item @code{shepherd-requirement} (default: @code{()})
+This option can be used to provide a list of symbols naming Shepherd services
+that this service will depend on, such as @code{'wpa-supplicant} or
+@code{'iwd} if you require authenticated access for encrypted WiFi or Ethernet
+networks.
+
 @item @code{disable-vpn?} (default: @code{#f})
 When true, disable connman's vpn plugin.
 
-@item @code{iwd?} (default: @code{#f})
-When true, ConnMan uses iwd to connect to wireless networks.
 @end table
 @end deftp
 
@@ -20031,7 +20046,7 @@ running a WiFi access point with @command{hostapd}, running the
 @command{inetd} ``superdaemon'', and more.  This section describes
 those.
 
-@deffn {Scheme Procedure} dhcpd-service-type
+@defvar dhcpd-service-type
 This type defines a service that runs a DHCP daemon.  To create a
 service of this type, you must supply a @code{<dhcpd-configuration>}.
 For example:
@@ -20042,7 +20057,7 @@ For example:
           (config-file (local-file "my-dhcpd.conf"))
           (interfaces '("enp0s25"))))
 @end lisp
-@end deffn
+@end defvar
 
 @deftp {Data Type} dhcpd-configuration
 @table @asis
@@ -20278,7 +20293,7 @@ to use with the options @option{iburst} and @option{prefer}, as well as
 @end deftp
 
 @cindex OpenNTPD
-@deffn {Scheme Procedure} openntpd-service-type
+@defvar openntpd-service-type
 Run the @command{ntpd}, the Network Time Protocol (NTP) daemon, as implemented
 by @uref{http://www.openntpd.org, OpenNTPD}.  The daemon will keep the system
 clock synchronized with that of the given servers.
@@ -20293,7 +20308,7 @@ clock synchronized with that of the given servers.
   (constraints-from '("https://www.google.com/"))))
 
 @end lisp
-@end deffn
+@end defvar
 
 @defvar %openntpd-servers
 This variable is a list of the server addresses defined in
@@ -20722,41 +20737,71 @@ Furthermore, @code{(gnu services ssh)} provides the following services.
 @cindex SSH
 @cindex SSH server
 
-@deffn {Scheme Procedure} lsh-service [#:host-key "/etc/lsh/host-key"] @
-       [#:daemonic? #t] [#:interfaces '()] [#:port-number 22] @
-       [#:allow-empty-passwords? #f] [#:root-login? #f] @
-       [#:syslog-output? #t] [#:x11-forwarding? #t] @
-       [#:tcp/ip-forwarding? #t] [#:password-authentication? #t] @
-       [#:public-key-authentication? #t] [#:initialize? #t]
-Run the @command{lshd} program from @var{lsh} to listen on port @var{port-number}.
-@var{host-key} must designate a file containing the host key, and readable
-only by root.
-
-When @var{daemonic?} is true, @command{lshd} will detach from the
-controlling terminal and log its output to syslogd, unless one sets
-@var{syslog-output?} to false.  Obviously, it also makes lsh-service
-depend on existence of syslogd service.  When @var{pid-file?} is true,
-@command{lshd} writes its PID to the file called @var{pid-file}.
-
-When @var{initialize?} is true, automatically create the seed and host key
-upon service activation if they do not exist yet.  This may take long and
-require interaction.
-
-When @var{initialize?} is false, it is up to the user to initialize the
-randomness generator (@pxref{lsh-make-seed,,, lsh, LSH Manual}), and to create
-a key pair with the private key stored in file @var{host-key} (@pxref{lshd
-basics,,, lsh, LSH Manual}).
-
-When @var{interfaces} is empty, lshd listens for connections on all the
-network interfaces; otherwise, @var{interfaces} must be a list of host names
-or addresses.
-
-@var{allow-empty-passwords?} specifies whether to accept log-ins with empty
-passwords, and @var{root-login?} specifies whether to accept log-ins as
-root.
+@defvar lsh-service-type
+Type of the service that runs the GNU@tie{}lsh secure shell (SSH)
+daemon, @command{lshd}.  The value for this service is a
+@code{<lsh-configuration>} object.
+@end defvar
 
-The other options should be self-descriptive.
-@end deffn
+@deftp {Data Type} lsh-configuration
+Data type representing the configuration of @command{lshd}.
+
+@table @asis
+@item @code{lsh} (default: @code{lsh}) (type: file-like)
+The package object of the GNU@tie{}lsh secure shell (SSH) daemon.
+
+@item @code{daemonic?} (default: @code{#t}) (type: boolean)
+Whether to detach from the controlling terminal.
+
+@item @code{host-key} (default: @code{"/etc/lsh/host-key"}) (type: string)
+File containing the @dfn{host key}.  This file must be readable by
+root only.
+
+@item @code{interfaces} (default: @code{()}) (type: list)
+List of host names or addresses that @command{lshd} will listen on.
+If empty, @command{lshd} listens for connections on all the network
+interfaces.
+
+@item @code{port-number} (default: @code{22}) (type: integer)
+Port to listen on.
+
+@item @code{allow-empty-passwords?} (default: @code{#f}) (type: boolean)
+Whether to accept log-ins with empty passwords.
+
+@item @code{root-login?} (default: @code{#f}) (type: boolean)
+Whether to accept log-ins as root.
+
+@item @code{syslog-output?} (default: @code{#t}) (type: boolean)
+Whether to log @command{lshd} standard output to syslogd.
+This will make the service depend on the existence of a syslogd service.
+
+@item @code{pid-file?} (default: @code{#f}) (type: boolean)
+When @code{#t}, @command{lshd} writes its PID to the file specified in
+@var{pid-file}.
+
+@item @code{pid-file} (default: @code{"/var/run/lshd.pid"}) (type: string)
+File that @command{lshd} will write its PID to.
+
+@item @code{x11-forwarding?} (default: @code{#t}) (type: boolean)
+Whether to enable X11 forwarding.
+
+@item @code{tcp/ip-forwarding?} (default: @code{#t}) (type: boolean)
+Whether to enable TCP/IP forwarding.
+
+@item @code{password-authentication?} (default: @code{#t}) (type: boolean)
+Whether to accept log-ins using password authentication.
+
+@item @code{public-key-authentication?} (default: @code{#t}) (type: boolean)
+Whether to accept log-ins using public key authentication.
+
+@item @code{initialize?} (default: @code{#t}) (type: boolean)
+When @code{#f}, it is up to the user to initialize the randomness
+generator (@pxref{lsh-make-seed,,, lsh, LSH Manual}), and to create
+a key pair with the private key stored in file @var{host-key}
+(@pxref{lshd basics,,, lsh, LSH Manual}).
+
+@end table
+@end deftp
 
 @cindex SSH
 @cindex SSH server
@@ -20950,19 +20995,18 @@ Match Address 192.168.0.1
 @end table
 @end deftp
 
-@deffn {Scheme Procedure} dropbear-service [@var{config}]
-Run the @uref{https://matt.ucc.asn.au/dropbear/dropbear.html,Dropbear SSH
-daemon} with the given @var{config}, a @code{<dropbear-configuration>}
-object.
+@defvar dropbear-service-type
+Type of the service that runs the
+@url{https://matt.ucc.asn.au/dropbear/dropbear.html, Dropbear SSH daemon},
+whose value is a @code{<dropbear-configuration>} object.
 
-For example, to specify a Dropbear service listening on port 1234, add
-this call to the operating system's @code{services} field:
+For example, to specify a Dropbear service listening on port 1234:
 
 @lisp
-(dropbear-service (dropbear-configuration
-                    (port-number 1234)))
+(service dropbear-service-type (dropbear-configuration
+                                 (port-number 1234)))
 @end lisp
-@end deffn
+@end defvar
 
 @deftp {Data Type} dropbear-configuration
 This data type represents the configuration of a Dropbear SSH daemon.
@@ -22155,37 +22199,56 @@ default is @code{-nolisten tcp}.
 @end table
 @end deftp
 
-@deffn {Scheme Procedure} set-xorg-configuration @var{config} @
-  [@var{login-manager-service-type}]
+@defun set-xorg-configuration config [login-manager-service-type]
 Tell the log-in manager (of type @var{login-manager-service-type}) to use
 @var{config}, an @code{<xorg-configuration>} record.
 
 Since the Xorg configuration is embedded in the log-in manager's
 configuration---e.g., @code{gdm-configuration}---this procedure provides a
 shorthand to set the Xorg configuration.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} xorg-start-command [@var{config}]
+@defun xorg-start-command [config]
 Return a @code{startx} script in which the modules, fonts, etc. specified
 in @var{config}, are available.  The result should be used in place of
 @code{startx}.
 
 Usually the X server is started by a login manager.
-@end deffn
+@end defun
+
 
+@defvar screen-locker-service-type
+Type for a service that adds a package for a screen locker or screen
+saver to the set of setuid programs and add a PAM entry for it.  The
+value for this service is a @code{<screen-locker-configuration>} object.
 
-@deffn {Scheme Procedure} screen-locker-service @var{package} [@var{program}]
-Add @var{package}, a package for a screen locker or screen saver whose
-command is @var{program}, to the set of setuid programs and add a PAM entry
-for it.  For example:
+For example, to make XlockMore usable:
 
 @lisp
-(screen-locker-service xlockmore "xlock")
+(service screen-locker-service-type
+         (screen-locker-configuration
+           "xlock" (file-append xlockmore "/bin/xlock") #f))
 @end lisp
 
 makes the good ol' XlockMore usable.
-@end deffn
+@end defvar
 
+@deftp {Data Type} screen-locker-configuration
+Data type representing the configuration of
+@code{screen-locker-service-type}.
+
+@table @asis
+@item @code{name} (type: string)
+Name of the screen locker.
+
+@item @code{program} (type: gexp)
+Path to the executable for the screen locker as a G-Expression.
+
+@item @code{allow-empty-password?} (type: boolean)
+Whether to allow empty passwords.
+
+@end table
+@end deftp
 
 @node Printing Services
 @subsection Printing Services
@@ -23033,9 +23096,7 @@ support (@pxref{Networking Services, @code{modem-manager-service-type}}),
 energy and color management services, the @code{elogind} login and seat
 manager, the Polkit privilege service, the GeoClue location service, the
 AccountsService daemon that allows authorized users change system passwords,
-an NTP client (@pxref{Networking Services}), the Avahi daemon, and has the
-name service switch service configured to be able to use @code{nss-mdns}
-(@pxref{Name Service Switch, mDNS}).
+a NTP client (@pxref{Networking Services}) and the Avahi daemon.
 @end defvar
 
 The @code{%desktop-services} variable can be used as the @code{services}
@@ -23236,120 +23297,172 @@ The actual service definitions included in @code{%desktop-services} and
 provided by @code{(gnu services dbus)} and @code{(gnu services desktop)}
 are described below.
 
-@deffn {Scheme Procedure} dbus-service [#:dbus @var{dbus}] [#:services '()] @
-                                       [#:verbose?]
-Return a service that runs the ``system bus'', using @var{dbus}, with
-support for @var{services}.  When @var{verbose?} is true, it causes the
-@samp{DBUS_VERBOSE} environment variable to be set to @samp{1}; a
-verbose-enabled D-Bus package such as @code{dbus-verbose} should be
-provided as @var{dbus} in this scenario.  The verbose output is logged
-to @file{/var/log/dbus-daemon.log}.
-
-@uref{https://dbus.freedesktop.org/, D-Bus} is an inter-process communication
-facility.  Its system bus is used to allow system services to communicate
-and to be notified of system-wide events.
-
-@var{services} must be a list of packages that provide an
-@file{etc/dbus-1/system.d} directory containing additional D-Bus configuration
-and policy files.  For example, to allow avahi-daemon to use the system bus,
-@var{services} must be equal to @code{(list avahi)}.
-@end deffn
+@defvar dbus-root-service-type
+Type for a service that runs the D-Bus ``system bus''.
+@footnote{@uref{https://dbus.freedesktop.org/, D-Bus} is an inter-process
+communication facility.  Its system bus is used to allow system services
+to communicate and to be notified of system-wide events.}
+
+The value for this service type is a @code{<dbus-configuration>} record.
+@end defvar
+
+@deftp {Data Type} dbus-configuration
+Data type representing the configuration for @code{dbus-root-service-type}.
+
+@table @asis
+@item @code{dbus} (default: @code{dbus}) (type: file-like)
+Package object for dbus.
+
+@item @code{services} (default: @code{()}) (type: list)
+List of packages that provide an @file{etc/dbus-1/system.d} directory
+containing additional D-Bus configuration and policy files.
+For example, to allow avahi-daemon to use the system bus, @var{services}
+must be equal to @code{(list avahi)}.
+
+@item @code{verbose?} (default: @code{#f}) (type: boolean)
+When @code{#t}, D-Bus is launched with environment variable
+@samp{DBUS_VERBOSE} set to @samp{1}.  A verbose-enabled D-Bus package
+such as @code{dbus-verbose} should be provided to @var{dbus} in this
+scenario. The verbose output is logged to
+@file{/var/log/dbus-daemon.log}.
+
+@end table
+@end deftp
+
+@subsubheading Elogind
 
-@deffn {Scheme Procedure} elogind-service [#:config @var{config}]
-Return a service that runs the @code{elogind} login and
-seat management daemon.  @uref{https://github.com/elogind/elogind,
-Elogind} exposes a D-Bus interface that can be used to know which users
+@uref{https://github.com/elogind/elogind, Elogind} is a login and seat
+management daemon that also handles most system-level power events for a
+computer, for example suspending the system when a lid is closed, or
+shutting it down when the power button is pressed.
+
+It also provides a D-Bus interface that can be used to know which users
 are logged in, know what kind of sessions they have open, suspend the
 system, inhibit system suspend, reboot the system, and other tasks.
 
-Elogind handles most system-level power events for a computer, for
-example suspending the system when a lid is closed, or shutting it down
-when the power button is pressed.
+@defvar elogind-service-type
+Type of the service that runs @command{elogind}, a login and
+seat management daemon.  The value for this service is a
+@code{<elogind-configuration>} object.
+@end defvar
 
-The @var{config} keyword argument specifies the configuration for
-elogind, and should be the result of an @code{(elogind-configuration
-(@var{parameter} @var{value})...)} invocation.  Available parameters and
-their default values are:
+@c TODO: field descriptions. This is best done by refactoring
+@c elogind-configuration to use define-configuration which embeds the
+@c descriptions in the code and then use configuration->documentation.
+@deftp {Data Type} elogind-configuration
+Data type representing the configuration of @command{elogind}.
+
+@table @asis
+@item @code{elogind} (default: @code{elogind}) (type: file-like)
+...
+
+@item @code{kill-user-processes?} (default: @code{#f}) (type: boolean)
+...
+
+@item @code{kill-only-users} (default: @code{'()}) (type: list)
+...
+
+@item @code{kill-exclude-users} (default: @code{'("root")}) (type: list-of-string)
+...
+
+@item @code{inhibit-delay-max-seconds} (default: @code{5}) (type: integer)
+...
+
+@item @code{handle-power-key} (default: @code{'poweroff}) (type: symbol)
+...
+
+@item @code{handle-suspend-key} (default: @code{'suspend}) (type: symbol)
+...
+
+@item @code{handle-hibernate-key} (default: @code{'hibernate}) (type: symbol)
+...
+
+@item @code{handle-lid-switch} (default: @code{'suspend}) (type: symbol)
+...
+
+@item @code{handle-lid-switch-docked} (default: @code{'ignore}) (type: symbol)
+...
+
+@item @code{handle-lid-switch-external-power} (default: @code{*unspecified*}) (type: symbol)
+...
+
+@item @code{power-key-ignore-inhibited?} (default: @code{#f}) (type: boolean)
+...
+
+@item @code{suspend-key-ignore-inhibited?} (default: @code{#f}) (type: boolean)
+...
+
+@item @code{hibernate-key-ignore-inhibited?} (default: @code{#f}) (type: boolean)
+...
+
+@item @code{lid-switch-ignore-inhibited?} (default: @code{#t}) (type: boolean)
+...
+
+@item @code{holdoff-timeout-seconds} (default: @code{30}) (type: integer)
+...
+
+@item @code{idle-action} (default: @code{'ignore}) (type: symbol)
+...
+
+@item @code{idle-action-seconds} (default: @code{(* 30 60)}) (type: integer)
+...
+
+@item @code{runtime-directory-size-percent} (default: @code{10}) (type: integer)
+...
+
+@item @code{runtime-directory-size} (default: @code{#f}) (type: integer)
+...
+
+@item @code{remove-ipc?} (default: @code{#t}) (type: boolean)
+...
+
+@item @code{suspend-state} (default: @code{'("mem" "standby" "freeze")}) (type: list)
+...
+
+@item @code{suspend-mode} (default: @code{'()}) (type: list)
+...
+
+@item @code{hibernate-state} (default: @code{'("disk")}) (type: list)
+...
+
+@item @code{hibernate-mode} (default: @code{'("platform" "shutdown")}) (type: list)
+...
+
+@item @code{hybrid-sleep-state} (default: @code{'("disk")}) (type: list)
+...
+
+@item @code{hybrid-sleep-mode} (default: @code{'("suspend" "platform" "shutdown")}) (type: list)
+...
 
-@table @code
-@item kill-user-processes?
-@code{#f}
-@item kill-only-users
-@code{()}
-@item kill-exclude-users
-@code{("root")}
-@item inhibit-delay-max-seconds
-@code{5}
-@item handle-power-key
-@code{poweroff}
-@item handle-suspend-key
-@code{suspend}
-@item handle-hibernate-key
-@code{hibernate}
-@item handle-lid-switch
-@code{suspend}
-@item handle-lid-switch-docked
-@code{ignore}
-@item handle-lid-switch-external-power
-@code{*unspecified*}
-@item power-key-ignore-inhibited?
-@code{#f}
-@item suspend-key-ignore-inhibited?
-@code{#f}
-@item hibernate-key-ignore-inhibited?
-@code{#f}
-@item lid-switch-ignore-inhibited?
-@code{#t}
-@item holdoff-timeout-seconds
-@code{30}
-@item idle-action
-@code{ignore}
-@item idle-action-seconds
-@code{(* 30 60)}
-@item runtime-directory-size-percent
-@code{10}
-@item runtime-directory-size
-@code{#f}
-@item remove-ipc?
-@code{#t}
-@item suspend-state
-@code{("mem" "standby" "freeze")}
-@item suspend-mode
-@code{()}
-@item hibernate-state
-@code{("disk")}
-@item hibernate-mode
-@code{("platform" "shutdown")}
-@item hybrid-sleep-state
-@code{("disk")}
-@item hybrid-sleep-mode
-@code{("suspend" "platform" "shutdown")}
 @end table
-@end deffn
+@end deftp
 
-@deffn {Scheme Procedure} accountsservice-service @
-       [#:accountsservice @var{accountsservice}]
-Return a service that runs AccountsService, a system service that can
+@defvar accountsservice-service-type
+Type for the service that runs AccountsService, a system service that can
 list available accounts, change their passwords, and so on.
 AccountsService integrates with PolicyKit to enable unprivileged users
 to acquire the capability to modify their system configuration.
-@uref{https://www.freedesktop.org/wiki/Software/AccountsService/, the
-accountsservice web site} for more information.
+See @url{https://www.freedesktop.org/wiki/Software/AccountsService/,
+AccountsService} for more information.
 
-The @var{accountsservice} keyword argument is the @code{accountsservice}
-package to expose as a service.
-@end deffn
+The value for this service is a file-like object, by default it is
+set to @code{accountsservice} (the package object for AccountsService).
+@end defvar
 
-@deffn {Scheme Procedure} polkit-service @
-                         [#:polkit @var{polkit}]
-Return a service that runs the
-@uref{https://www.freedesktop.org/wiki/Software/polkit/, Polkit privilege
+@defvar polkit-service-type
+Type for the service that runs the
+@url{https://www.freedesktop.org/wiki/Software/polkit/, Polkit privilege
 management service}, which allows system administrators to grant access to
 privileged operations in a structured way.  By querying the Polkit service, a
 privileged system component can know when it should grant additional
 capabilities to ordinary users.  For example, an ordinary user can be granted
 the capability to suspend the system if the user is logged in locally.
-@end deffn
+
+The value for this service is a @code{<polkit-configuration>} object.
+@end defvar
+
+@c TODO: Document <polkit-configuration>, preferably by refactoring this to use
+@c       define-configuration and generating documentation from it.
 
 @defvar polkit-wheel-service
 Service that adds the @code{wheel} group as admins to the Polkit
@@ -23433,9 +23546,10 @@ Possible values are:
 @end table
 @end deftp
 
-@deffn {Scheme Procedure} udisks-service [#:udisks @var{udisks}]
-Return a service for @uref{https://udisks.freedesktop.org/docs/latest/,
-UDisks}, a @dfn{disk management} daemon that provides user interfaces
+@defvar udisks-service-type
+Type for the service that runs
+@uref{https://udisks.freedesktop.org/docs/latest/, UDisks},
+a @dfn{disk management} daemon that provides user interfaces
 with notifications and ways to mount/unmount disks.  Programs that talk
 to UDisks include the @command{udisksctl} command, part of UDisks, and
 GNOME Disks.  Note that Udisks relies on the @command{mount} command, so
@@ -23443,7 +23557,19 @@ it will only be able to use the file-system utilities installed in the
 system profile.  For example if you want to be able to mount NTFS
 file-systems in read and write fashion, you'll need to have
 @code{ntfs-3g} installed system-wide.
-@end deffn
+
+The value for this service is a @code{<udisks-configuration>} object.
+@end defvar
+
+@deftp {Data Type} udisks-configuration
+Data type representing the configuration for @code{udisks-service-type}.
+
+@table @asis
+@item @code{udisks} (default: @code{udisks}) (type: file-like)
+Package object for UDisks.
+
+@end table
+@end deftp
 
 @defvar colord-service-type
 This is the type of the service that runs @command{colord}, a system
@@ -23496,7 +23622,7 @@ a system which relies on @code{%desktop-services}, you may use
 @end lisp
 @end defvar
 
-@deffn {Scheme Procedure} geoclue-application name [#:allowed? #t] [#:system? #f] [#:users '()]
+@defun geoclue-application name [#:allowed? #t] [#:system? #f] [#:users '()]
 Return a configuration allowing an application to access GeoClue
 location data.  @var{name} is the Desktop ID of the application, without
 the @code{.desktop} part.  If @var{allowed?} is true, the application
@@ -23505,7 +23631,7 @@ will have access to location information by default.  The boolean
 or not.  Finally @var{users} is a list of UIDs of all users for which
 this application is allowed location info access.  An empty users list
 means that all users are allowed.
-@end deffn
+@end defun
 
 @defvar %standard-geoclue-applications
 The standard list of well-known GeoClue application configurations,
@@ -23516,29 +23642,18 @@ IceCat and Epiphany both query the user before allowing a web page to
 know the user's location.
 @end defvar
 
-@deffn {Scheme Procedure} geoclue-service [#:colord @var{colord}] @
-                         [#:whitelist '()] @
-                         [#:wifi-geolocation-url "https://location.services.mozilla.com/v1/geolocate?key=geoclue"] @
-                         [#:submit-data? #f]
-                         [#:wifi-submission-url "https://location.services.mozilla.com/v1/submit?key=geoclue"] @
-                         [#:submission-nick "geoclue"] @
-                         [#:applications %standard-geoclue-applications]
-Return a service that runs the GeoClue location service.  This service
-provides a D-Bus interface to allow applications to request access to a
-user's physical location, and optionally to add information to online
-location databases.  See
-@uref{https://wiki.freedesktop.org/www/Software/GeoClue/, the GeoClue
-web site} for more information.
-@end deffn
+@defvar geoclue-service-type
+Type for the service that runs the
+@url{https://wiki.freedesktop.org/www/Software/GeoClue/, GeoClue}
+location service.  This service provides a D-Bus interface to allow
+applications to request access to a user's physical location, and
+optionally to add information to online location databases.
 
-@deffn {Scheme Procedure} bluetooth-service [#:bluez @var{bluez}] @
-       [@w{#:auto-enable? #f}]
-Return a service that runs the @command{bluetoothd} daemon, which
-manages all the Bluetooth devices and provides a number of D-Bus
-interfaces.  When AUTO-ENABLE? is true, the bluetooth controller is
-powered automatically at boot, which can be useful when using a
-bluetooth keyboard or mouse.
-@end deffn
+The value for this service is a @code{<geoclue-configuration>} object.
+@end defvar
+
+@c TODO: Document <geoclue-configuration>, preferably by refactoring this to use
+@c       define-configuration and generating documentation from it.
 
 @defvar bluetooth-service-type
 This is the type for the @uref{https://bluez.org/, Linux Bluetooth Protocol
@@ -24603,9 +24718,10 @@ in the subsections below.
 
 @subsubheading Dovecot Service
 
-@deffn {Scheme Procedure} dovecot-service [#:config (dovecot-configuration)]
-Return a service that runs the Dovecot IMAP/POP3/LMTP mail server.
-@end deffn
+@defvar dovecot-service-type
+Type for the service that runs the Dovecot IMAP/POP3/LMTP mail server,
+whose value is a @code{<dovecot-configuration>} object.
+@end defvar
 
 By default, Dovecot does not need much configuration; the default
 configuration object created by @code{(dovecot-configuration)} will
@@ -24620,9 +24736,9 @@ For example, to specify that mail is located at @code{maildir~/.mail},
 one would instantiate the Dovecot service like this:
 
 @lisp
-(dovecot-service #:config
-                 (dovecot-configuration
-                  (mail-location "maildir:~/.mail")))
+(service dovecot-service-type
+         (dovecot-configuration
+           (mail-location "maildir:~/.mail")))
 @end lisp
 
 The available configuration parameters follow.  Each parameter
@@ -27477,7 +27593,7 @@ client is already being used.  Otherwise, the
 procedures provided by this module can be used to obtain a suitable hash
 value.
 
-@deffn {Scheme Procedure} transmission-password-hash @var{password} @var{salt}
+@defun transmission-password-hash password salt
 Returns a string containing the result of hashing @var{password}
 together with @var{salt}, in the format recognized by Transmission
 clients for their @code{rpc-password} configuration setting.
@@ -27485,13 +27601,13 @@ clients for their @code{rpc-password} configuration setting.
 @var{salt} must be an eight-character string.  The
 @code{transmission-random-salt} procedure can be used to generate a
 suitable salt value at random.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} transmission-random-salt
+@defun transmission-random-salt
 Returns a string containing a random, eight-character salt value of the
 type generated and used by Transmission clients, suitable for passing to
 the @code{transmission-password-hash} procedure.
-@end deffn
+@end defun
 
 These procedures are accessible from within a Guile REPL started with
 the @command{guix repl} command (@pxref{Invoking guix repl}).  This is
@@ -29463,7 +29579,7 @@ The details for the @code{httpd-configuration}, @code{httpd-module},
 @code{httpd-config-file} and @code{httpd-virtualhost} record types are
 given below.
 
-@deffn {Data Type} httpd-configuration
+@deftp {Data Type} httpd-configuration
 This data type represents the configuration for the httpd service.
 
 @table @asis
@@ -29480,9 +29596,9 @@ G-expression that generates a file, for example a @code{plain-file}.  A
 file outside of the store can also be specified through a string.
 
 @end table
-@end deffn
+@end deftp
 
-@deffn {Data Type} httpd-module
+@deftp {Data Type} httpd-module
 This data type represents a module for the httpd service.
 
 @table @asis
@@ -29496,13 +29612,13 @@ within the store, for example @code{(file-append mod-wsgi
 "/modules/mod_wsgi.so")}.
 
 @end table
-@end deffn
+@end deftp
 
 @defvar %default-httpd-modules
 A default list of @code{httpd-module} objects.
 @end defvar
 
-@deffn {Data Type} httpd-config-file
+@deftp {Data Type} httpd-config-file
 This data type represents a configuration file for the httpd service.
 
 @table @asis
@@ -29581,9 +29697,9 @@ Any values which the service is extended with will be appended to this
 list.
 
 @end table
-@end deffn
+@end deftp
 
-@deffn {Data Type} httpd-virtualhost
+@deftp {Data Type} httpd-virtualhost
 This data type represents a virtualhost configuration block for the httpd service.
 
 These should be added to the extra-config for the httpd-service.
@@ -29607,7 +29723,7 @@ The contents of the @code{VirtualHost} directive, this should be a list
 of strings and G-expressions.
 
 @end table
-@end deffn
+@end deftp
 
 @anchor{NGINX}
 @subsubheading NGINX
@@ -29648,7 +29764,7 @@ configuration.  In our case, startup error messages can be found in
 @file{/var/log/nginx/error.log}.  The second location can be changed
 with the @var{log-directory} configuration option.
 
-@deffn {Data Type} nginx-configuration
+@deftp {Data Type} nginx-configuration
 This data type represents the configuration for NGinx.  Some
 configuration can be done through this and the other provided record
 types, or alternatively, a config file can be provided.
@@ -29788,7 +29904,7 @@ Extra content for the @code{http} block.  Should be string or a string
 valued G-expression.
 
 @end table
-@end deffn
+@end deftp
 
 @anchor{nginx-server-configuration}
 @deftp {Data Type} nginx-server-configuration
@@ -30388,13 +30504,11 @@ The time in seconds after which a process with no requests is killed.
 @end deftp
 
 
-@deffn {Scheme Procedure} nginx-php-location @
-       [#:nginx-package nginx] @
-       [socket (string-append "/var/run/php" @
-                              (version-major (package-version php)) @
-                              "-fpm.sock")]
+@defun nginx-php-location [#:nginx-package nginx] @
+  [socket (string-append "/var/run/php" @
+  (version-major (package-version php)) "-fpm.sock")]
 A helper function to quickly add php to an @code{nginx-server-configuration}.
-@end deffn
+@end defun
 
 A simple services setup for nginx with php can look like this:
 @lisp
@@ -30417,7 +30531,7 @@ The cat avatar generator is a simple service to demonstrate the use of php-fpm
 in @code{Nginx}.  It is used to generate cat avatar from a seed, for instance
 the hash of a user's email address.
 
-@deffn {Scheme Procedure} cat-avatar-generator-service @
+@defun cat-avatar-generator-service @
        [#:cache-dir "/var/cache/cat-avatar-generator"] @
        [#:package cat-avatar-generator] @
        [#:configuration (nginx-server-configuration)]
@@ -30425,7 +30539,7 @@ Returns an nginx-server-configuration that inherits @code{configuration}.  It
 extends the nginx configuration to add a server block that serves @code{package},
 a version of cat-avatar-generator.  During execution, cat-avatar-generator will
 be able to use @code{cache-dir} as its cache directory.
-@end deffn
+@end defun
 
 A simple setup for cat-avatar-generator can look like this:
 @lisp
@@ -31382,6 +31496,10 @@ in @var{servers}.
 @item @code{servers} (default: @code{'()})
 Specify IP address of upstream servers directly.
 
+@item @code{servers-file} (default: @code{#f})
+Specify file containing upstream servers. This file is re-read when dnsmasq receives SIGHUP.
+Could be either a string or a file-like object.
+
 @item @code{addresses} (default: @code{'()})
 For each entry, specify an IP address to return for any host in the
 given domains.  Queries in the domains are never forwarded and always
@@ -31752,20 +31870,22 @@ desktop-environment or should be run manually.
 
 It provides a @emph{client} service for your machine to connect to a
 VPN, and a @emph{server} service for your machine to host a VPN@.
+Both @code{openvpn-client-service-type} and
+@code{openvpn-server-service-type} can be run simultaneously.
 
-@deffn {Scheme Procedure} openvpn-client-service @
-       [#:config (openvpn-client-configuration)]
-
-Return a service that runs @command{openvpn}, a VPN daemon, as a client.
-@end deffn
+@defvar openvpn-client-service-type
+Type of the service that runs @command{openvpn}, a VPN daemon, as a client.
 
-@deffn {Scheme Procedure} openvpn-server-service @
-       [#:config (openvpn-server-configuration)]
+The value for this service is a @code{<openvpn-client-configuration>}
+object.
+@end defvar
 
-Return a service that runs @command{openvpn}, a VPN daemon, as a server.
+@defvar openvpn-server-service-type
+Type of the service that runs @command{openvpn}, a VPN daemon, as a server.
 
-Both can be run simultaneously.
-@end deffn
+The value for this service is a @code{<openvpn-server-configuration>}
+object.
+@end defvar
 
 @c %automatically generated documentation
 
@@ -32339,7 +32459,7 @@ guest only = yes\n"))))
 
 @end defvar
 
-@deftp{Data Type} samba-service-configuration
+@deftp {Data Type} samba-service-configuration
 Configuration record for the Samba suite.
 
 @table @asis
@@ -34426,20 +34546,20 @@ The QEMU package to use.
 @end table
 @end deftp
 
-@deffn {Scheme Procedure} lookup-qemu-platforms @var{platforms}@dots{}
+@defun lookup-qemu-platforms platforms@dots{}
 Return the list of QEMU platform objects corresponding to
 @var{platforms}@dots{}.  @var{platforms} must be a list of strings
 corresponding to platform names, such as @code{"arm"}, @code{"sparc"},
 @code{"mips64el"}, and so on.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} qemu-platform? @var{obj}
+@defun qemu-platform? obj
 Return true if @var{obj} is a platform object.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} qemu-platform-name @var{platform}
+@defun qemu-platform-name platform
 Return the name of @var{platform}---a string such as @code{"arm"}.
-@end deffn
+@end defun
 
 
 @subsubheading QEMU Guest Agent
@@ -34935,27 +35055,27 @@ Alignment of the partition in sectors.
 @end table
 @end deftp
 
-@deffn {Scheme Procedure} debootstrap-variant @var{name} @var{configuration}
+@defun debootstrap-variant name configuration
 This is a helper procedure that creates a @code{ganeti-os-variant} record.  It
 takes two parameters: a name and a @code{debootstrap-configuration} object.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} debootstrap-os @var{variants}@dots{}
+@defun debootstrap-os variants@dots{}
 This is a helper procedure that creates a @code{ganeti-os} record.  It takes
 a list of variants created with @code{debootstrap-variant}.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} guix-variant @var{name} @var{configuration}
+@defun guix-variant name configuration
 This is a helper procedure that creates a @code{ganeti-os-variant} record for
 use with the Guix OS provider.  It takes a name and a G-expression that returns
 a ``file-like'' (@pxref{G-Expressions, file-like objects}) object containing a
 Guix System configuration.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} guix-os @var{variants}@dots{}
+@defun guix-os variants@dots{}
 This is a helper procedure that creates a @code{ganeti-os} record.  It
 takes a list of variants produced by @code{guix-variant}.
-@end deffn
+@end defun
 
 @defvar %default-debootstrap-variants
 This is a convenience variable to make the debootstrap provider work
@@ -35453,7 +35573,7 @@ create an @code{nginx-location-configuration} from a
 @code{git-http-configuration} and then add that location to a web
 server.
 
-@deffn {Scheme Procedure} git-http-nginx-location-configuration @
+@defun git-http-nginx-location-configuration @
        [config=(git-http-configuration)]
 Compute an @code{nginx-location-configuration} that corresponds to the
 given Git http configuration.  An example nginx service definition to
@@ -35482,7 +35602,7 @@ certificate.  @xref{Certificate Services}.  The default @code{certbot}
 service will redirect all HTTP traffic on @code{git.my-host.org} to
 HTTPS@.  You will also need to add an @code{fcgiwrap} proxy to your
 system services.  @xref{Web Services}.
-@end deffn
+@end defun
 
 @subsubheading Cgit Service
 
@@ -37617,35 +37737,60 @@ under @file{pcsc/drivers} in the store directory of the package.
 @end table
 @end deftp
 
-@cindex lirc
-@subsubheading Lirc Service
+@cindex LIRC
+@subsubheading LIRC Service
 
 The @code{(gnu services lirc)} module provides the following service.
 
-@deffn {Scheme Procedure} lirc-service [#:lirc lirc] @
-       [#:device #f] [#:driver #f] [#:config-file #f] @
-       [#:extra-options '()]
-Return a service that runs @url{http://www.lirc.org,LIRC}, a daemon that
-decodes infrared signals from remote controls.
+@defvar lirc-service-type
+Type for a service that runs @url{http://www.lirc.org, LIRC}, a daemon
+that decodes infrared signals from remote controls.
 
-Optionally, @var{device}, @var{driver} and @var{config-file}
-(configuration file name) may be specified.  See @command{lircd} manual
-for details.
+The value for this service is a @code{<lirc-configuration>} object.
+@end defvar
 
-Finally, @var{extra-options} is a list of additional command-line options
-passed to @command{lircd}.
-@end deffn
+@deftp {Data Type} lirc-configuration
+Data type representing the configuration of @command{lircd}.
 
-@cindex spice
-@subsubheading Spice Service
+@table @asis
+@item @code{lirc} (default: @code{lirc}) (type: file-like)
+Package object for @command{lirc}.
+
+@item @code{device} (default: @code{#f}) (type: string)
+@itemx @code{driver} (default: @code{#f}) (type: string)
+@itemx @code{config-file} (default: @code{#f}) (type: string-or-file-like)
+TODO.  See @command{lircd} manual for details.
+
+@item @code{extra-options} (default: @code{'()}) (type: list-of-string)
+Additional command-line options to pass to @command{lircd}.
+
+@end table
+@end deftp
+
+@c TODO: Document <lirc-configuration>, preferably by refactoring this to use
+@c       define-configuration and generating documentation from it.
+
+@cindex SPICE
+@subsubheading SPICE Service
 
 The @code{(gnu services spice)} module provides the following service.
 
-@deffn {Scheme Procedure} spice-vdagent-service [#:spice-vdagent]
-Returns a service that runs @url{https://www.spice-space.org,VDAGENT}, a daemon
-that enables sharing the clipboard with a vm and setting the guest display
-resolution when the graphical console window resizes.
-@end deffn
+@defvar spice-vdagent-service-type
+Type of the service that runs @url{https://www.spice-space.org, VDAGENT},
+a daemon that enables sharing the clipboard with a vm and setting the
+guest display resolution when the graphical console window resizes.
+@end defvar
+
+@deftp {Data Type} spice-vdagent-configuration
+Data type representing the configuration of
+@code{spice-vdagent-service-type}.
+
+@table @asis
+@item @code{spice-vdagent} (default: @code{spice-vdagent}) (type: file-like)
+Package object for VDAGENT.
+
+@end table
+@end deftp
 
 @cindex inputattach
 @subsubheading inputattach Service
@@ -37681,25 +37826,17 @@ If true, this must be the name of a file to log messages to.
 
 @subsubheading Dictionary Service
 @cindex dictionary
+
 The @code{(gnu services dict)} module provides the following service:
 
 @defvar dicod-service-type
 This is the type of the service that runs the @command{dicod} daemon, an
 implementation of DICT server (@pxref{Dicod,,, dico, GNU Dico Manual}).
-@end defvar
-
-@deffn {Scheme Procedure} dicod-service [#:config (dicod-configuration)]
-Return a service that runs the @command{dicod} daemon, an implementation
-of DICT server (@pxref{Dicod,,, dico, GNU Dico Manual}).
-
-The optional @var{config} argument specifies the configuration for
-@command{dicod}, which should be a @code{<dicod-configuration>} object, by
-default it serves the GNU Collaborative International Dictionary of English.
 
 You can add @command{open localhost} to your @file{~/.dico} file to make
 @code{localhost} the default server for @command{dico} client
 (@pxref{Initialization File,,, dico, GNU Dico Manual}).
-@end deffn
+@end defvar
 
 @deftp {Data Type} dicod-configuration
 Data type representing the configuration of dicod.
@@ -37764,22 +37901,24 @@ A @code{<dicod-database>} object serving the GNU Collaborative International
 Dictionary of English using the @code{gcide} package.
 @end defvar
 
-The following is an example @code{dicod-service} configuration.
+The following is an example @code{dicod-service-type} configuration.
 
 @lisp
-(dicod-service #:config
-  (dicod-configuration
-   (handlers (list (dicod-handler
-                    (name "wordnet")
-                    (module "dictorg")
-                    (options
-                     (list #~(string-append "dbdir=" #$wordnet))))))
-   (databases (list (dicod-database
-                     (name "wordnet")
-                     (complex? #t)
-                     (handler "wordnet")
-                     (options '("database=wn")))
-                    %dicod-database:gcide))))
+(service dicod-service-type
+         (dicod-configuration
+          (handlers (list
+                     (dicod-handler
+                      (name "wordnet")
+                      (module "dictorg")
+                      (options
+                       (list #~(string-append "dbdir=" #$wordnet))))))
+          (databases (list
+                      (dicod-database
+                       (name "wordnet")
+                       (complex? #t)
+                       (handler "wordnet")
+                       (options '("database=wn")))
+                      %dicod-database:gcide))))
 @end lisp
 
 @cindex Docker
@@ -38074,7 +38213,7 @@ is an example of a basic, explicit configuration:
 @end lisp
 @end defvar
 
-@deffn {Scheme Procedure} fail2ban-jail-service @var{svc-type} @var{jail}
+@defun fail2ban-jail-service svc-type jail
 Extend @var{svc-type}, a @code{<service-type>} object with @var{jail}, a
 @code{fail2ban-jail-configuration} object.
 
@@ -38094,7 +38233,7 @@ For example:
      (enabled? #t)))
    (openssh-configuration ...))))
 @end lisp
-@end deffn
+@end defun
 
 Below is the reference for the different @code{jail-service-type}
 configuration records.
@@ -38701,7 +38840,7 @@ here is how to use it and customize it further.
 
 @cindex initrd
 @cindex initial RAM disk
-@deffn {Scheme Procedure} raw-initrd @var{file-systems} @
+@defun raw-initrd file-systems @
        [#:linux-modules '()] [#:pre-mount #t] [#:mapped-devices '()] @
        [#:keyboard-layout #f] [#:helper-packages '()] @
        [#:qemu-networking? #f] [#:volatile-root? #f]
@@ -38730,9 +38869,9 @@ initrd can be used as a QEMU guest with para-virtualized I/O drivers.
 
 When @var{volatile-root?} is true, the root file system is writable but any changes
 to it are lost.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} base-initrd @var{file-systems} @
+@defun base-initrd file-systems @
        [#:mapped-devices '()] [#:keyboard-layout #f] @
        [#:qemu-networking? #f] [#:volatile-root? #f] @
        [#:linux-modules '()]
@@ -38754,7 +38893,7 @@ The initrd is automatically populated with all the kernel modules necessary
 for @var{file-systems} and for the given options.  Additional kernel
 modules can be listed in @var{linux-modules}.  They will be added to the initrd, and
 loaded at boot time in the order in which they appear.
-@end deffn
+@end defun
 
 Needless to say, the initrds we produce and use embed a
 statically-linked Guile, and the initialization program is a Guile
@@ -38762,13 +38901,13 @@ program.  That gives a lot of flexibility.  The
 @code{expression->initrd} procedure builds such an initrd, given the
 program to run in that initrd.
 
-@deffn {Scheme Procedure} expression->initrd @var{exp} @
+@defun expression->initrd exp @
        [#:guile %guile-static-stripped] [#:name "guile-initrd"]
 Return as a file-like object a Linux initrd (a gzipped cpio archive)
 containing @var{guile} and that evaluates @var{exp}, a G-expression,
 upon booting.  All the derivations referenced by @var{exp} are
 automatically copied to the initrd.
-@end deffn
+@end defun
 
 @node Bootloader Configuration
 @section Bootloader Configuration
@@ -39114,14 +39253,14 @@ The GRUB @code{gfxmode} to set (a list of screen resolution strings,
 @end table
 @end deftp
 
-@deffn {Scheme Procedure} grub-theme
+@defun grub-theme
 Return the default GRUB theme used by the operating system if no
 @code{theme} field is specified in @code{bootloader-configuration}
 record.
 
 It comes with a fancy background image displaying the GNU and Guix
 logos.
-@end deffn
+@end defun
 
 For example, to override the default resolution, you may use something
 like
@@ -40373,7 +40512,7 @@ Services}).  This section provides a reference on how to manipulate
 services and service types.  This interface is provided by the
 @code{(gnu services)} module.
 
-@deffn {Scheme Procedure} service @var{type} [@var{value}]
+@defun service type [value]
 Return a new service of @var{type}, a @code{<service-type>} object (see
 below).  @var{value} can be any object; it represents the parameters of
 this particular service instance.
@@ -40398,20 +40537,20 @@ is equivalent to this:
 
 In both cases the result is an instance of @code{openssh-service-type}
 with the default configuration.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} service? @var{obj}
+@defun service? obj
 Return true if @var{obj} is a service.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} service-kind @var{service}
+@defun service-kind service
 Return the type of @var{service}---i.e., a @code{<service-type>} object.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} service-value @var{service}
+@defun service-value service
 Return the value associated with @var{service}.  It represents its
 parameters.
-@end deffn
+@end defun
 
 Here is an example of how a service is created and manipulated:
 
@@ -40440,8 +40579,8 @@ standard list combinators such as @code{map} and @code{fold} to do that
 @code{modify-services} simply provides a more concise form for this
 common pattern.
 
-@deffn {Scheme Syntax} modify-services @var{services} @
-  (@var{type} @var{variable} => @var{body}) @dots{}
+@defspec modify-services services @
+  (type variable => body) @dots{}
 
 Modify the services listed in @var{services} according to the given
 clauses.  Each clause has the form:
@@ -40474,7 +40613,7 @@ Such a clause removes all services of the given @var{type} from
 
 @xref{Using the Configuration System}, for example usage.
 
-@end deffn
+@end defspec
 
 Next comes the programming interface for service types.  This is
 something you want to know when writing new service definitions, but not
@@ -40532,24 +40671,23 @@ The returned service in this case has the default value specified by
 @xref{Service Types and Services}, for examples.
 @end deftp
 
-@deffn {Scheme Procedure} service-extension @var{target-type} @
-                              @var{compute}
+@defun service-extension target-type compute
 Return a new extension for services of type @var{target-type}.
 @var{compute} must be a one-argument procedure: @code{fold-services}
 calls it, passing it the value associated with the service that provides
 the extension; it must return a valid value for the target service.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} service-extension? @var{obj}
+@defun service-extension? obj
 Return true if @var{obj} is a service extension.
-@end deffn
+@end defun
 
 Occasionally, you might want to simply extend an existing service.  This
 involves creating a new service type and specifying the extension of
 interest, which can be verbose; the @code{simple-service} procedure
 provides a shorthand for this.
 
-@deffn {Scheme Procedure} simple-service @var{name} @var{target} @var{value}
+@defun simple-service name target value
 Return a service that extends @var{target} with @var{value}.  This works
 by creating a singleton service type @var{name}, of which the returned
 service is an instance.
@@ -40561,7 +40699,7 @@ an additional job:
 (simple-service 'my-mcron-job mcron-service-type
                 #~(job '(next-hour (3)) "guix gc -F 2G"))
 @end lisp
-@end deffn
+@end defun
 
 At the core of the service abstraction lies the @code{fold-services}
 procedure, which is responsible for ``compiling'' a list of services
@@ -40571,11 +40709,10 @@ command (@pxref{Invoking guix system}).  In essence, it propagates
 service extensions down the service graph, updating each node parameters
 on the way, until it reaches the root node.
 
-@deffn {Scheme Procedure} fold-services @var{services} @
-                            [#:target-type @var{system-service-type}]
+@defun fold-services services [#:target-type system-service-type]
 Fold @var{services} by propagating their extensions down to the root of
 type @var{target-type}; return the root service adjusted accordingly.
-@end deffn
+@end defun
 
 Lastly, the @code{(gnu services)} module also defines several essential
 service types, some of which are listed below.
@@ -40858,7 +40995,7 @@ info on actions.
 @end deftp
 
 @cindex configuration file, of Shepherd services
-@deffn {Scheme Procedure} shepherd-configuration-action
+@defun shepherd-configuration-action
 Return a @code{configuration} action to display @var{file}, which should
 be the name of the service's configuration file.
 
@@ -40888,7 +41025,7 @@ cat $(herd configuration tor)
 @end example
 
 This can come in as a handy debugging tool!
-@end deffn
+@end defun
 
 @defvar shepherd-root-service-type
 The service type for the Shepherd ``root service''---i.e., PID@tie{}1.
@@ -40952,8 +41089,7 @@ procedures that take some kind of Scheme value and returns a
 G-expression (@pxref{G-Expressions}), which should, once serialized to
 the disk, return a string.  More details are listed below.
 
-@deffn {Scheme Syntax} define-configuration @var{name} @var{clause1} @
-@var{clause2} ...
+@defmac define-configuration name clause1 clause2 @dots{}
 Create a record type named @code{@var{name}} that contains the
 fields found in the clauses.
 
@@ -41063,9 +41199,9 @@ macro which is a shorthand of this.
    (string "test")
    "Some documentation."))
 @end lisp   
-@end deffn
+@end defmac
 
-@deffn {Scheme Syntax} define-maybe @var{type}
+@defmac define-maybe type
 Sometimes a field should not be serialized if the user doesn’t specify a
 value.  To achieve this, you can use the @code{define-maybe} macro to
 define a ``maybe type''; if the value of a maybe type is left unset, or
@@ -41117,32 +41253,30 @@ whether its value is set or not.
    maybe-symbol
    "Docstring."))
 @end lisp
-@end deffn
+@end defmac
 
-@deffn (Scheme Procedure) maybe-value-set? @var{value}
+@defun maybe-value-set? value
 Predicate to check whether a user explicitly specified the value of a
 maybe field.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} serialize-configuration @var{configuration} @
-@var{fields}
+@defun serialize-configuration configuration fields
 Return a G-expression that contains the values corresponding to the
 @var{fields} of @var{configuration}, a record that has been generated by
 @code{define-configuration}.  The G-expression can then be serialized to
 disk by using something like @code{mixed-text-file}.
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} empty-serializer @var{field-name} @var{value}
+@defun empty-serializer field-name value
 A serializer that just returns an empty string.  The
 @code{serialize-package} procedure is an alias for this.
-@end deffn
+@end defun
 
 Once you have defined a configuration record, you will most likely also
 want to document it so that other people know to use it.  To help with
 that, there are two procedures, both of which are documented below.
 
-@deffn {Scheme Procedure} generate-documentation @var{documentation} @
-@var{documentation-name}
+@defun generate-documentation documentation documentation-name
 Generate a Texinfo fragment from the docstrings in @var{documentation},
 a list of @code{(@var{label} @var{fields} @var{sub-documentation} ...)}.
 @var{label} should be a symbol and should be the name of the
@@ -41172,16 +41306,15 @@ record in one of its @code{rcfile} field, therefore documentation for
 @var{documentation-name} should be a symbol and should be the name of
 the configuration record.
 
-@end deffn
+@end defun
 
-@deffn {Scheme Procedure} configuration->documentation
-@var{configuration-symbol}
+@defun configuration->documentation configuration-symbol
 Take @var{configuration-symbol}, the symbol corresponding to the name
 used when defining a configuration record with
 @code{define-configuration}, and print the Texinfo documentation of its
 fields.  This is useful if there aren’t any nested configuration records
 since it only prints the documentation for the top-level fields.
-@end deffn
+@end defun
 
 As of right now, there is no automated way to generate documentation for
 configuration records and put them in the manual.  Instead, every
@@ -41532,15 +41665,18 @@ service with the @code{simple-service} procedure from @code{(gnu
 services)}.
 
 @menu
-* Essential Home Services::  Environment variables, packages, on-* scripts.
-* Shells: Shells Home Services.                        POSIX shells, Bash, Zsh.
-* Mcron: Mcron Home Service.                           Scheduled User's Job Execution.
-* Power Management: Power Management Home Services.    Services for battery power.
-* Shepherd: Shepherd Home Service.                     Managing User's Daemons.
-* SSH: Secure Shell.                                   Setting up the secure shell client.
-* Desktop: Desktop Home Services.                      Services for graphical environments.
-* Guix: Guix Home Services.                            Services for Guix.
-* Fonts: Fonts Home Services.                          Services for managing User's fonts.
+* Essential Home Services::     Environment variables, packages, on-* scripts.
+* Shells: Shells Home Services.  POSIX shells, Bash, Zsh.
+* Mcron: Mcron Home Service.    Scheduled User's Job Execution.
+* Power Management: Power Management Home Services.  Services for battery power.
+* Shepherd: Shepherd Home Service.  Managing User's Daemons.
+* SSH: Secure Shell.            Setting up the secure shell client.
+* Desktop: Desktop Home Services.  Services for graphical environments.
+* Guix: Guix Home Services.     Services for Guix.
+* Fonts: Fonts Home Services.   Services for managing User's fonts.
+* Sound: Sound Home Services.   Dealing with audio.
+* Messaging: Messaging Home Services.   Services for managing messaging.
+* Media: Media Home Services.   Services for managing media.
 @end menu
 @c In addition to that Home Services can provide
 
@@ -42300,6 +42436,43 @@ Extra content appended as-is to this @code{Host} block in
 
 @c %end of fragment
 
+@cindex ssh-agent
+The @uref{https://www.openssh.com, OpenSSH package} includes a daemon,
+the @command{ssh-agent} command, that manages keys to connect to remote
+machines using the @acronym{SSH, secure shell} protocol.  With the
+@code{(gnu home services ssh-agent)} service, you can configure the
+OpenSSH ssh-agent to run upon login.
+
+Here is an example of a service and its configuration that you could add
+to the @code{services} field of your @code{home-environment}:
+
+@lisp
+(service home-ssh-agent-service-type
+  (home-ssh-agent-configuration
+   (extra-options '("-t" "1h30m"))))
+@end lisp
+
+@defvar home-ssh-agent-service-type
+This is the type of the @code{git daemon} home service, whose value is an
+@code{home-ssh-agent-configuration} object.
+@end defvar
+
+@deftp {Data Type} home-ssh-agent-configuration
+Available @code{home-ssh-agent-configuration} fields are:
+
+@table @asis
+@item @code{git} (default: @code{git}) (type: file-like)
+The git package to use.
+
+@item @code{socket-directory} (default: @code{@env{XDG_RUNTIME_DIR}/ssh-agent"}) (type: gexp)
+The directory to write the ssh-agent's @file{socket} file.
+
+@item @code{extra-options} (default: @code{'()})
+Extra options will be passed to @command{ssh-agent}, please run
+@command{man ssh-agent} for more information.
+
+@end table
+@end deftp
 
 @node Desktop Home Services
 @subsection Desktop Home Services
@@ -42393,6 +42566,77 @@ The package providing the @code{/bin/dbus-daemon} command.
 @end table
 @end deftp
 
+@defvar home-unclutter-service-type
+This is the service type for Unclutter, a program that runs on the
+background of an X11 session and detects when the X pointer hasn't moved
+for a specified idle timeout, after which it hides the cursor so that
+you can focus on the text underneath.  Its associated value must be a
+@code{home-unclutter-configuration} record, as shown below.
+
+A typical configuration, where we manually specify the idle timeout (in
+seconds), might look like this:
+
+@lisp
+(service home-unclutter-service-type
+         (home-unclutter-configuration
+          (idle-timeout 2)))
+@end lisp
+@end defvar
+
+@deftp {Data Type} home-unclutter-configuration
+The configuration record for @code{home-unclutter-service-type}.
+
+@table @asis
+@item @code{unclutter} (default: @code{unclutter}) (type: file-like)
+Unclutter package to use.
+
+@item @code{idle-timeout} (default: @code{5}) (type: integer)
+A timeout in seconds after which to hide cursor.
+@end table
+
+@end deftp
+
+@defvar home-xmodmap-service-type
+This is the service type for the
+@uref{https://gitlab.freedesktop.org/xorg/app/xmodmap,xmodmap} utility
+to modify keymaps and pointer button mappings under the Xorg display
+server.  Its associated value must be a
+@code{home-xmodmap-configuration} record, as shown below.
+
+The @code{key-map} field takes a list of objects, each of which is
+either a @dfn{statement} (a string) or an @dfn{assignment} (a pair of
+strings).  As an example, the snippet below swaps around the
+@kbd{Caps_Lock} and the @kbd{Control_L} keys, by first removing the
+keysyms (on the right-hand side) from the corresponding modifier maps
+(on the left-hand side), re-assigning them by swapping each other out,
+and finally adding back the keysyms to the modifier maps.
+
+@lisp
+(service home-xmodmap-service-type
+         (home-xmodmap-configuration
+          (key-map '(("remove Lock" . "Caps_Lock")
+                     ("remove Control" . "Control_L")
+                     ("keysym Control_L" . "Caps_Lock")
+                     ("keysym Caps_Lock" . "Control_L")
+                     ("add Lock" . "Caps_Lock")
+                     ("add Control" . "Control_L")))))
+@end lisp
+@end defvar
+
+@deftp {Data Type} home-xmodmap-configuration
+The configuration record for @code{home-xmodmap-service-type}.  Its
+available fields are:
+
+@table @asis
+@item @code{xmodmap} (default: @code{xmodmap}) (type: file-like)
+The @code{xmodmap} package to use.
+
+@item @code{key-map} (default: @code{'()}) (type: list)
+The list of expressions to be read by @code{xmodmap} on service startup.
+
+@end table
+@end deftp
+
 @node Guix Home Services
 @subsection Guix Home Services
 
@@ -42454,6 +42698,173 @@ like this:
 @end lisp
 @end defvar
 
+@node Sound Home Services
+@subsection Sound Home Services
+
+The @code{(gnu home services sound)} module provides services related to
+sound support.
+
+@cindex PulseAudio, home service
+@cindex RTP, for PulseAudio
+
+The following services dynamically reconfigure the
+@uref{https://pulseaudio.org,PulseAudio sound server}: they let you
+toggle broadcast of audio output over the network using the
+@acronym{RTP, real-time transport protocol} and, correspondingly,
+playback of sound received over RTP.  Once
+@code{home-pulseaudio-rtp-sink-service-type} is among your home
+services, you can start broadcasting audio output by running this
+command:
+
+@example
+herd start pulseaudio-rtp-sink
+@end example
+
+You can then run a PulseAudio-capable mixer, such as @code{pavucontrol}
+or @code{pulsemixer} (both from the same-named package) to control which
+audio stream(s) should be sent to the RTP ``sink''.
+
+By default, audio is broadcasted to a multicast address: any device on
+the @acronym{LAN, local area network} receives it and may play it.
+Using multicast in this way puts a lot of pressure on the network and
+degrades its performance, so you may instead prefer sending to
+specifically one device.  The first way to do that is by specifying the
+IP address of the target device when starting the service:
+
+@example
+herd start pulseaudio-rtp-sink 192.168.1.42
+@end example
+
+The other option is to specify this IP address as the one to use by
+default in your home environment configuration:
+
+@lisp
+(service home-pulseaudio-rtp-sink-service-type
+         "192.168.1.42")
+@end lisp
+
+On the device where you intend to receive and play the RTP stream, you
+can use @code{home-pulseaudio-rtp-source-service-type}, like so:
+
+@lisp
+(service home-pulseaudio-rtp-source-service-type)
+@end lisp
+
+This will then let you start the receiving module for PulseAudio:
+
+@example
+herd start pulseaudio-rtp-source
+@end example
+
+Again, by default it will listen on the multicast address.  If, instead,
+you'd like it to listen for direct incoming connections, you can do that
+by running:
+
+@lisp
+(service home-pulseaudio-rtp-source-service-type
+         "0.0.0.0")
+@end lisp
+
+The reference of these services is given below.
+
+@defvar home-pulseaudio-rtp-sink-service-type
+@defvarx home-pulseaudio-rtp-source-service-type
+This is the type of the service to send, respectively receive, audio
+streams over @acronym{RTP, real-time transport protocol}.
+
+The value associated with this service is the IP address (a string)
+where to send, respectively receive, the audio stream.  By default,
+audio is sent/received on multicast address
+@code{%pulseaudio-rtp-multicast-address}.
+
+This service defines one Shepherd service: @code{pulseaudio-rtp-sink},
+respectively @code{pulseaudio-rtp-source}.  The service is not started
+by default, so you have to explicitly start it when you want to turn it
+on, as in this example:
+
+@example
+herd start pulseaudio-rtp-sink
+@end example
+
+Stopping the Shepherd service turns off broadcasting.
+@end defvar
+
+@defvar %pulseaudio-rtp-multicast-address
+This is the multicast address used by default by the two services above.
+@end defvar
+
+@node Messaging Home Services
+@subsection Messaging Home Services
+
+@cindex znc
+The @uref{https://znc.in, ZNC bouncer} can be run as a daemon to manage
+your IRC presence.  With the @code{(gnu home services znc)} service, you
+can configure ZNC to run upon login.
+
+You will have to provide a @file{~/.znc/configs/znc.conf} seperately.
+
+Here is an example of a service and its configuration that you could add
+to the @code{services} field of your @code{home-environment}:
+
+@lisp
+(service home-znc-service-type)
+@end lisp
+
+@defvar home-znc-service-type
+This is the type of the @code{git daemon} home service, whose value is an
+@code{home-znc-configuration} object.
+@end defvar
+
+@deftp {Data Type} home-znc-configuration
+Available @code{home-znc-configuration} fields are:
+
+@table @asis
+@item @code{git} (default: @code{git}) (type: file-like)
+The git package to use.
+
+@item @code{extra-options} (default: @code{'()})
+Extra options will be passed to @command{znc}, please run @command{man
+znc} for more information.
+
+@end table
+@end deftp
+
+@node Media Home Services
+@subsection Media Home Services
+
+@cindex kodi
+The @uref{https://kodi.tv, KODI media center} can be run as a daemon on
+a media server.  With the @code{(gnu home services kodi)} service, you
+can configure KODI to run upon login.
+
+Here is an example of a service and its configuration that you could add
+to the @code{services} field of your @code{home-environment}:
+
+@lisp
+(service home-kodi-service-type
+  (home-kodi-configuration
+   (extra-options '("--settings="<settings-file>"))))
+@end lisp
+
+@defvar home-kodi-service-type
+This is the type of the @code{git daemon} home service, whose value is an
+@code{home-kodi-configuration} object.
+@end defvar
+
+@deftp {Data Type} home-kodi-configuration
+Available @code{home-kodi-configuration} fields are:
+
+@table @asis
+@item @code{git} (default: @code{git}) (type: file-like)
+The git package to use.
+
+@item @code{extra-options} (default: @code{'()})
+Extra options will be passed to @command{kodi}, please run @command{man
+kodi} for more information.
+
+@end table
+@end deftp
+
 @node Invoking guix home
 @section Invoking @command{guix home}