Skip to content
Snippets Groups Projects
Commit 773e956d authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

system: Augment the default set of groups.

* gnu/system/shadow.scm (%base-groups): New variable.
* gnu/system.scm (<operating-system>)[groups]: Use it as the default.
parent 72507e23
No related branches found
No related tags found
No related merge requests found
...@@ -92,9 +92,7 @@ (define-record-type* <operating-system> operating-system ...@@ -92,9 +92,7 @@ (define-record-type* <operating-system> operating-system
(users operating-system-users ; list of user accounts (users operating-system-users ; list of user accounts
(default '())) (default '()))
(groups operating-system-groups ; list of user groups (groups operating-system-groups ; list of user groups
(default (list (user-group (default %base-groups))
(name "root")
(id 0)))))
(skeletons operating-system-skeletons ; list of name/monadic value (skeletons operating-system-skeletons ; list of name/monadic value
(default (default-skeletons))) (default (default-skeletons)))
......
...@@ -42,7 +42,8 @@ (define-module (gnu system shadow) ...@@ -42,7 +42,8 @@ (define-module (gnu system shadow)
user-group-id user-group-id
default-skeletons default-skeletons
skeleton-directory)) skeleton-directory
%base-groups))
;;; Commentary: ;;; Commentary:
;;; ;;;
...@@ -71,6 +72,26 @@ (define-record-type* <user-group> ...@@ -71,6 +72,26 @@ (define-record-type* <user-group>
(password user-group-password (default #f)) (password user-group-password (default #f))
(id user-group-id (default #f))) (id user-group-id (default #f)))
(define %base-groups
;; Default set of groups.
(list (user-group (name "root") (id 0))
(user-group (name "wheel")) ; root-like users
(user-group (name "users")) ; normal users
(user-group (name "nogroup")) ; for daemons etc.
;; The following groups are conventionally used by things like udev to
;; control access to hardware devices.
(user-group (name "tty"))
(user-group (name "dialout"))
(user-group (name "kmem"))
(user-group (name "video"))
(user-group (name "audio"))
(user-group (name "lp"))
(user-group (name "disk"))
(user-group (name "floppy"))
(user-group (name "cdrom"))
(user-group (name "tape"))))
(define (default-skeletons) (define (default-skeletons)
"Return the default skeleton files for /etc/skel. These files are copied by "Return the default skeleton files for /etc/skel. These files are copied by
'useradd' in the home directory of newly created user accounts." 'useradd' in the home directory of newly created user accounts."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment