diff options
author | Herman Rimm <herman@rimm.ee> | 2024-09-27 20:39:19 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-10-14 14:08:43 +0200 |
commit | 766ad072ad90d4ffc161cb83e29910b7bb3a9d54 (patch) | |
tree | c004c9925b3203e55db235a6d3280f9b20b5062c /gnu | |
parent | 41b5b723b32142f05da49570a0fa3fae46237661 (diff) | |
download | guix-766ad072ad90d4ffc161cb83e29910b7bb3a9d54.tar guix-766ad072ad90d4ffc161cb83e29910b7bb3a9d54.tar.gz |
services: configuration: Document multiple configurations per field.
* gnu/services/configuration.scm (generate-documentation): Filter for all
configurations associated with each field-name.
* doc/guix.texi (Complex Configurations): Describe use case for multiple
field-names.
Change-Id: I6d1e7b8858231aa05fda884b31a9bd0a48f07293
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/services/configuration.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index d2b1687496..e76ad5e8cb 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2021 Andrew Tropin <andrew@trop.in> ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu> +;;; Copyright © 2024 Herman Rimm <herman@rimm.ee> ;;; ;;; This file is part of GNU Guix. ;;; @@ -460,8 +461,12 @@ DEFAULT." (para ,@field-docs) ,@(append-map generate - (or (assq-ref sub-documentation field-name) - '()))))) + (filter-map + (match-lambda + ((name config) + (and (eq? name field-name) + config))) + sub-documentation))))) fields))))))) (stexi->texi `(*fragment* . ,(generate documentation-name)))) |