summaryrefslogtreecommitdiff
path: root/guix/build/activation.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/build/activation.scm')
-rw-r--r--guix/build/activation.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/guix/build/activation.scm b/guix/build/activation.scm
index 9464d2157d..b04b017881 100644
--- a/guix/build/activation.scm
+++ b/guix/build/activation.scm
@@ -36,13 +36,14 @@
;;;
;;; Code:
-(define* (add-group name #:key gid password
+(define* (add-group name #:key gid password system?
(log-port (current-error-port)))
"Add NAME as a user group, with the given numeric GID if specified."
;; Use 'groupadd' from the Shadow package.
(format log-port "adding group '~a'...~%" name)
(let ((args `(,@(if gid `("-g" ,(number->string gid)) '())
,@(if password `("-p" ,password) '())
+ ,@(if system? `("--system") '())
,name)))
(zero? (apply system* "groupadd" args))))
@@ -128,9 +129,11 @@ numeric gid or #f."
;; Then create the groups.
(for-each (match-lambda
- ((name password gid)
+ ((name password gid system?)
(unless (false-if-exception (getgrnam name))
- (add-group name #:gid gid #:password password))))
+ (add-group name
+ #:gid gid #:password password
+ #:system? system?))))
groups)
;; Finally create the other user accounts.