1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- (define-module (gnu installer user)
- #:use-module (guix records)
- #:use-module (srfi srfi-1)
- #:export (<user>
- user
- make-user
- user-name
- user-real-name
- user-group
- user-home-directory
- user-password
- users->configuration))
- (define-record-type* <user>
- user make-user
- user?
- (name user-name)
- (real-name user-real-name
- (default ""))
- (group user-group
- (default "users"))
- (password user-password)
- (home-directory user-home-directory))
- (define (users->configuration users)
- "Return the configuration field for USERS."
- (define (user->sexp user)
- `(user-account
- (name ,(user-name user))
- (comment ,(user-real-name user))
- (group ,(user-group user))
- (home-directory ,(user-home-directory user))
- (supplementary-groups '("wheel" "netdev"
- "audio" "video"))))
- `((users (cons*
- ,@(filter-map (lambda (user)
-
- (and (not (string=? (user-name user) "root"))
- (user->sexp user)))
- users)
- %base-user-accounts))))
|