[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
30/67: installer: Add user module.
From: |
guix-commits |
Subject: |
30/67: installer: Add user module. |
Date: |
Wed, 16 Jan 2019 19:00:40 -0500 (EST) |
civodul pushed a commit to branch wip-newt-installer
in repository guix.
commit 76fa249e4d2c547552daf28c867d7b71633f8743
Author: Mathieu Othacehe <address@hidden>
Date: Wed Dec 5 14:55:41 2018 +0900
installer: Add user module.
* gnu/installer/user.scm: New file.
---
gnu/installer/user.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
gnu/local.mk | 1 +
po/guix/POTFILES.in | 1 +
3 files changed, 52 insertions(+)
diff --git a/gnu/installer/user.scm b/gnu/installer/user.scm
new file mode 100644
index 0000000..1f8d40a
--- /dev/null
+++ b/gnu/installer/user.scm
@@ -0,0 +1,50 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2018 Mathieu Othacehe <address@hidden>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu installer user)
+ #:use-module (guix records)
+ #:export (<user>
+ user
+ make-user
+ user-name
+ user-group
+ user-home-directory
+
+ users->configuration))
+
+(define-record-type* <user>
+ user make-user
+ user?
+ (name user-name)
+ (group user-group
+ (default "users"))
+ (home-directory user-home-directory))
+
+(define (users->configuration users)
+ "Return the configuration field for USERS."
+ `((users (cons*
+ ,@(map (lambda (user)
+ `(user-account
+ (name ,(user-name user))
+ (group ,(user-group user))
+ (home-directory ,(user-home-directory user))
+ (supplementary-groups
+ (quote ("wheel" "netdev"
+ "audio" "video")))))
+ users)
+ %base-user-accounts))))
diff --git a/gnu/local.mk b/gnu/local.mk
index bcb5e5f..0b5e96a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -577,6 +577,7 @@ GNU_SYSTEM_MODULES += \
%D%/installer/services.scm \
%D%/installer/steps.scm \
%D%/installer/timezone.scm \
+ %D%/installer/user.scm \
%D%/installer/utils.scm \
\
%D%/installer/newt/ethernet.scm \
diff --git a/po/guix/POTFILES.in b/po/guix/POTFILES.in
index df7459a..48c09a1 100644
--- a/po/guix/POTFILES.in
+++ b/po/guix/POTFILES.in
@@ -31,6 +31,7 @@ gnu/installer/newt/wifi.scm
gnu/installer/services.scm
gnu/installer/steps.scm
gnu/installer/timezone.scm
+gnu/installer/user.scm
gnu/installer/utils.scm
guix/scripts.scm
guix/scripts/build.scm
- 18/67: gnu: Add guile-parted., (continued)
- 18/67: gnu: Add guile-parted., guix-commits, 2019/01/16
- 33/67: installer: Reorder local.mk., guix-commits, 2019/01/16
- 05/67: installer: newt: Use scheme-modules* instead of scheme-modules., guix-commits, 2019/01/16
- 17/67: gnu: guile-newt: Update to revision 4., guix-commits, 2019/01/16
- 35/67: installer: Fix compute calls., guix-commits, 2019/01/16
- 36/67: installer: Reorder partitionment step., guix-commits, 2019/01/16
- 24/67: installer: Add services page., guix-commits, 2019/01/16
- 37/67: installer: locale: Make clear that the point is to select a glibc locale., guix-commits, 2019/01/16
- 26/67: installer: Add new pages., guix-commits, 2019/01/16
- 07/67: configure: Disable installer build by default., guix-commits, 2019/01/16
- 30/67: installer: Add user module.,
guix-commits <=
- 50/67: installer: partition: Fix typo., guix-commits, 2019/01/16
- 49/67: installer: partition: Fix swaping and use syscalls., guix-commits, 2019/01/16
- 53/67: file-systems: Add read-luks-partition-uuid., guix-commits, 2019/01/16
- 46/67: installer: Display an eventual backtrace in a page., guix-commits, 2019/01/16
- 22/67: installer: Add configuration formatter., guix-commits, 2019/01/16
- 57/67: installer: parted: Do not call BLKRRPART on loop devices., guix-commits, 2019/01/16
- 08/67: doc: Document the graphical installer., guix-commits, 2019/01/16
- 03/67: gnu: kmscon: Add runtime keymap update support., guix-commits, 2019/01/16
- 27/67: installer: Redirect to TTY3 root shell for unguided install., guix-commits, 2019/01/16
- 13/67: installer: Fix locale installation., guix-commits, 2019/01/16