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

  • Done
  • quality assurance status badge
Details
3 participants
  • Josselin Poiret
  • Liliana Marie Prikler
  • Wicki Gabriel (wicg)
Owner
unassigned
Submitted by
Wicki Gabriel (wicg)
Severity
normal
W
W
Wicki Gabriel (wicg) wrote on 6 Mar 2023 18:25
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
ZR0P278MB0268CD60FE72D9D0ED450E52C1B69@ZR0P278MB0268.CHEP278.PROD.OUTLOOK.COM
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
Attachment: file
From 3bb4a0990906d227d77819d404864adef652933c Mon Sep 17 00:00:00 2001
From: gabriel <gabriel@erlikon.ch>
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(-)

Toggle diff (49 lines)
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
L
L
Liliana Marie Prikler wrote on 8 Mar 2023 21:53
a8a28bdcd8f306b5359826ac7fd087553dcf1ed0.camel@gmail.com
Am Montag, dem 06.03.2023 um 17:25 +0000 schrieb Wicki Gabriel (wicg):
Toggle quote (6 lines)
> 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.
Note that user-account and user-group are also valid outside those
fields, e.g. as part of service configurations. Also, an example has
already been given in section 12.1.

Cheers
J
J
Josselin Poiret wrote on 6 Jun 2023 16:23
Re: [bug#62007] doc: User Accounts: Refine user-account and user-group
87legw8yac.fsf@jpoiret.xyz
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
-----BEGIN PGP SIGNATURE-----

iQHEBAEBCgAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmR/QWsQHGRldkBqcG9p
cmV0Lnh5egAKCRBQXkC5Fhcair1UDACYgk0AqCMDi3X54Ow+xvJ/3jXf3fnMTABq
4QKAmBUIiUYNgx8XBaVxdPUF7Bieyqr1rYehtaXyTVgu/580QCVltRG+qR9n5b3E
4q7AAAXLzx/93DgI0rfQA1k3V+FjHMLvSt6/uKduehDniagjlLexVCJ2NlXh7gUi
zTqrSZeNip1aAXKlHZT3Q/wNmcH8sQr88HKAMFDqSDNGVjisDeozW4e3dbgb9J5r
XdQ54m1RQ/fW2QBw/XglwKkAEVPhEqQpH7Imnr+ksIU5qQA/ojCO1rP8tnH8wCf4
A/ogBruqViFRkE4f4jRWpUoSOH41o8oqW+KhfLfxL9Y0yu5MAhF8SQ5R/BzKC0Hi
O+itDGEaa7iTyI7r0k8u4O3/E9COz+d+peQRm4Y+Fdag66WxahF809HJyxFjyJKW
7sEy7nGrFZV2xsFcZxNoHZUgtr1OABIQ4Jmx3G8XBay39yltSeCZAOSNHTCIdPoJ
ZnF6WyYLSeXVpyqeNl7Ae/MwIjuFJBY=
=AFjT
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 62007@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 62007
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch