summary refs log tree commit diff
path: root/gnu/installer/user.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-08-02 23:27:52 +0200
committerLudovic Courtès <ludo@gnu.org>2022-08-08 11:54:25 +0200
commitff9522fb69b9f4a31a5b766029e26dc53a2d1cf8 (patch)
tree95ca88675af10dc2abae8f223364bc1d9f8b78c2 /gnu/installer/user.scm
parentcd1a98b928be9602ebf103744164ace7bfcae22c (diff)
downloadguix-ff9522fb69b9f4a31a5b766029e26dc53a2d1cf8.tar.gz
installer: Add comments and vertical space to the generated config.
* gnu/installer/parted.scm (user-partitions->configuration): Introduce
vertical space and a comment.
* gnu/installer/services.scm (G_): New macro.
(%system-services): Add comment for OpenSSH.
(system-services->configuration): Add vertical space and comments.
* gnu/installer/user.scm (users->configuration): Add comment.
* gnu/installer/steps.scm (format-configuration): Add comment.
(configuration->file): Expound leading comment.  Pass #:format-comment
to 'pretty-print-with-comments/splice'.
Diffstat (limited to 'gnu/installer/user.scm')
-rw-r--r--gnu/installer/user.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/installer/user.scm b/gnu/installer/user.scm
index c894a91dc8..224040530c 100644
--- a/gnu/installer/user.scm
+++ b/gnu/installer/user.scm
@@ -18,6 +18,7 @@
 
 (define-module (gnu installer user)
   #:use-module (guix records)
+  #:use-module (guix read-print)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-9 gnu)
@@ -69,7 +70,11 @@
       (supplementary-groups '("wheel" "netdev"
                               "audio" "video"))))
 
-  `((users (cons*
+  (define-syntax-rule (G_ str) str)
+
+  `(,(vertical-space 1)
+    ,(comment (G_ ";; The list of user accounts ('root' is implicit).\n"))
+    (users (cons*
             ,@(filter-map (lambda (user)
                             ;; Do not emit a 'user-account' form for "root".
                             (and (not (string=? (user-name user) "root"))