summaryrefslogtreecommitdiff
path: root/gnu/system/shadow.scm
diff options
context:
space:
mode:
authorEfraim Flashner <[email protected]>2023-01-30 11:33:18 +0200
committerEfraim Flashner <[email protected]>2023-01-30 12:39:40 +0200
commit4cf1acc7f3033b50b0bf19e02c9f522d522d338c (patch)
tree9fd64956ee60304c15387eb394cd649e49f01467 /gnu/system/shadow.scm
parentedb8c09addd186d9538d43b12af74d6c7aeea082 (diff)
parent595b53b74e3ef57a1c0c96108ba86d38a170a241 (diff)
Merge remote-tracking branch 'origin/master' into core-updates
Conflicts: doc/guix.texi gnu/local.mk gnu/packages/admin.scm gnu/packages/base.scm gnu/packages/chromium.scm gnu/packages/compression.scm gnu/packages/databases.scm gnu/packages/diffoscope.scm gnu/packages/freedesktop.scm gnu/packages/gnome.scm gnu/packages/gnupg.scm gnu/packages/guile.scm gnu/packages/inkscape.scm gnu/packages/llvm.scm gnu/packages/openldap.scm gnu/packages/pciutils.scm gnu/packages/ruby.scm gnu/packages/samba.scm gnu/packages/sqlite.scm gnu/packages/statistics.scm gnu/packages/syndication.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/version-control.scm gnu/packages/xml.scm guix/build-system/copy.scm guix/scripts/home.scm
Diffstat (limited to 'gnu/system/shadow.scm')
-rw-r--r--gnu/system/shadow.scm33
1 files changed, 15 insertions, 18 deletions
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 59f0a02c8b..2e87928368 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <[email protected]>
+;;; Copyright © 2013-2020, 2022 Ludovic Courtès <[email protected]>
;;; Copyright © 2016 Alex Griffin <[email protected]>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <[email protected]>
;;; Copyright © 2020 Efraim Flashner <[email protected]>
@@ -63,7 +63,8 @@
user-group-id
user-group-system?)
- #:export (default-skeletons
+ #:export (%default-bashrc
+ default-skeletons
skeleton-directory
%base-groups
%base-user-accounts
@@ -118,14 +119,8 @@
(create-home-directory? #f)
(system? #t))))
-(define (default-skeletons)
- "Return the default skeleton files for /etc/skel. These files are copied by
-'useradd' in the home directory of newly created user accounts."
-
- (let ((profile (plain-file "bash_profile" "\
-# Honor per-interactive-shell startup file
-if [ -f ~/.bashrc ]; then . ~/.bashrc; fi\n"))
- (bashrc (plain-file "bashrc" "\
+(define %default-bashrc
+ (plain-file "bashrc" "\
# Bash initialization for interactive non-login shells and
# for remote shells (info \"(bash) Bash Startup Files\").
@@ -145,18 +140,20 @@ then
fi
# Source the system-wide file.
-source /etc/bashrc
+[ -f /etc/bashrc ] && source /etc/bashrc
-# Adjust the prompt depending on whether we're in 'guix environment'.
-if [ -n \"$GUIX_ENVIRONMENT\" ]
-then
- PS1='\\u@\\h \\w [env]\\$ '
-else
- PS1='\\u@\\h \\w\\$ '
-fi
alias ls='ls -p --color=auto'
alias ll='ls -l'
alias grep='grep --color=auto'\n"))
+
+(define (default-skeletons)
+ "Return the default skeleton files for /etc/skel. These files are copied by
+'useradd' in the home directory of newly created user accounts."
+
+ (let ((profile (plain-file "bash_profile" "\
+# Honor per-interactive-shell startup file
+if [ -f ~/.bashrc ]; then . ~/.bashrc; fi\n"))
+ (bashrc %default-bashrc)
(zprofile (plain-file "zprofile" "\
# Honor system-wide environment variables
source /etc/profile\n"))