diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-05-06 18:23:27 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-05-06 18:26:54 +0200 |
commit | d9959421a54fb0f9fbb2a9016da036319b99adb9 (patch) | |
tree | 351af2856af29073ffbfdfc61c8ca97478e20cf6 | |
parent | d664f1b431d2a64ff58ddc4ccce40e187947b960 (diff) | |
download | gnu-guix-d9959421a54fb0f9fbb2a9016da036319b99adb9.tar gnu-guix-d9959421a54fb0f9fbb2a9016da036319b99adb9.tar.gz |
system: /etc/profile sources each profile's /etc/profile.
Partly fixes <http://bugs.gnu.org/20255>.
Reported by 宋文武 <iyzsong@gmail.com>.
* gnu/system.scm (etc-directory)[profile]: Source
/run/current-system/profile/etc/profile and
$HOME/.guix-profile/etc/profile when available. Move definitions of
SSL_CERT_DIR, SSL_CERT_FILE, and GIT_SSL_CAINFO before that.
-rw-r--r-- | gnu/system.scm | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/gnu/system.scm b/gnu/system.scm index 609604a9b5..104b223539 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -461,14 +461,40 @@ export TZDIR=\"" tzdata "/share/zoneinfo\" # Tell 'modprobe' & co. where to look for modules. export LINUX_MODULE_DIRECTORY=/run/booted-system/kernel/lib/modules -export PATH=$HOME/.guix-profile/bin:/run/current-system/profile/bin -export PATH=/run/setuid-programs:/run/current-system/profile/sbin:$PATH +# These variables are honored by OpenSSL (libssl) and Git. +export SSL_CERT_DIR=/etc/ssl/certs +export SSL_CERT_FILE=\"$SSL_CERT_DIR/ca-certificates.crt\" +export GIT_SSL_CAINFO=\"$SSL_CERT_FILE\" + +# Crucial variables that could be missing the the profiles' 'etc/profile' +# because they would require combining both profiles. +# FIXME: See <http://bugs.gnu.org/20255>. export MANPATH=$HOME/.guix-profile/share/man:/run/current-system/profile/share/man export INFOPATH=$HOME/.guix-profile/share/info:/run/current-system/profile/share/info - export XDG_DATA_DIRS=$HOME/.guix-profile/share:/run/current-system/profile/share export XDG_CONFIG_DIRS=$HOME/.guix-profile/etc/xdg:/run/current-system/profile/etc/xdg +# Ignore the default value of 'PATH'. +unset PATH + +# Load the system profile's settings. +GUIX_PROFILE=/run/current-system/profile \\ +source /run/current-system/profile/etc/profile + +# Prepend setuid programs. +export PATH=/run/setuid-programs:$PATH + +if [ -d \"$HOME/.guix-profile\" ] +then + # Load the user profile's settings. + GUIX_PROFILE=\"$HOME/.guix-profile\" \\ + source \"$HOME/.guix-profile/etc/profile\" +else + # At least define this one so that basic things just work + # when the user installs their first package. + export PATH=\"$HOME/.guix-profile/bin:$PATH\" +fi + # Append the directory of 'site-start.el' to the search path. export EMACSLOADPATH=:/etc/emacs @@ -476,11 +502,6 @@ export EMACSLOADPATH=:/etc/emacs # when /etc/machine-id is missing. Make sure these warnings are non-fatal. export DBUS_FATAL_WARNINGS=0 -# These variables are honored by OpenSSL (libssl) and Git. -export SSL_CERT_DIR=/etc/ssl/certs -export SSL_CERT_FILE=\"$SSL_CERT_DIR/ca-certificates.crt\" -export GIT_SSL_CAINFO=\"$SSL_CERT_FILE\" - # Allow Aspell to find dictionaries installed in the user profile. export ASPELL_CONF=\"dict-dir $HOME/.guix-profile/lib/aspell\" |