Subject: bug#62007: closed (Re: [bug#62007] doc: User Accounts: Refine user-account and user-group)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 06 Jun 2023 14:24:02 +0000

Your bug report

#62007: doc: User Accounts: Refine user-account and user-group

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
62007: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62007
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#62007] doc: User Accounts: Refine user-account and user-group
From: Josselin Poiret <[email-masked]>
To: Liliana Marie Prikler <[email-masked]>, "Wicki Gabriel (wicg)" <[email-masked]>, [email-masked]
Date: Tue, 06 Jun 2023 16:23:39 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi everyone,

I agree with Lily here, this should document only the user-account and
user-group records, not specific fields of operating-system which is
already documented in "(guix) operating-system Reference".

Closing, but feel free to continue the discussion if it's still unclear.

Best,
-- 
Josselin Poiret

Subject: doc: User Accounts: Refine user-account and user-group
From: "Wicki Gabriel (wicg)" <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Mon, 6 Mar 2023 17:25:44 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi

I've stumbled upon some room for improvement considering where to add groups to a Guix system. Chapter 12.6 mentions the needed forms but lacks clear indication which operating-system​ fields to add these to.

My patch takes care of that.

This patch is based on commit 7bbeaa87e3796d56cc762dcfbc340f9be301d5f6

TIA,
g
From 3bb4a0990906d227d77819d404864adef652933c Mon Sep 17 00:00:00 2001
From: gabriel <[email-masked]>
Date: Mon, 6 Mar 2023 18:04:17 +0100
Subject: [PATCH] doc: User Accounts: Refine user-account and user-group
 examples

* doc/guix.texi (User Accounts): Show where the user-account and user-group
forms belong within the operation-system context.
---
 doc/guix.texi | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 6671ba9305..de34ca7ff4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -17388,18 +17388,21 @@ $ sudo filefrag -e /swapfile | grep '^ *0:' | cut -d: -f3 | cut -d. -f1
 @cindex accounts
 @cindex user accounts
 User accounts and groups are entirely managed through the
-@code{operating-system} declaration.  They are specified with the
-@code{user-account} and @code{user-group} forms:
+@code{operating-system} declaration.  They are specified with
+@code{user-account} forms in the @code{users}-field and
+@code{user-group} forms in the @code{groups}-field:
 
 @lisp
-(user-account
-  (name "alice")
-  (group "users")
-  (supplementary-groups '("wheel"   ;allow use of sudo, etc.
-                          "audio"   ;sound card
-                          "video"   ;video devices such as webcams
-                          "cdrom")) ;the good ol' CD-ROM
-  (comment "Bob's sister"))
+(users (cons*
+         (user-account
+           (name "alice")
+           (group "users")
+           (supplementary-groups '("wheel"   ;allow use of sudo, etc.
+                                   "audio"   ;sound card
+                                   "video"   ;video devices such as webcams
+                                   "cdrom")) ;the good ol' CD-ROM
+           (comment "Bob's sister"))
+         %base-user-accounts))
 @end lisp
 
 Here's a user account that uses a different shell and a custom home
@@ -17519,7 +17522,9 @@ Guile Reference Manual}, for information on Guile's @code{crypt} procedure.
 User group declarations are even simpler:
 
 @lisp
-(user-group (name "students"))
+(groups (cons*
+         (user-group (name "students"))
+         %base-groups))
 @end lisp
 
 @deftp {Data Type} user-group
-- 
2.39.1