aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tropin <andrew@trop.in>2023-01-13 14:09:02 +0400
committerAndrew Tropin <andrew@trop.in>2023-04-09 11:06:54 +0400
commit02033bfc05a1e82b12e80c6d000e1724e910e899 (patch)
tree1b6940e5c354d693ff9650bed1d4c1a4addea4b3
parent7b094d36837bdcc41e0637939f0e38dde8efaddc (diff)
downloadguix-02033bfc05a1e82b12e80c6d000e1724e910e899.tar
guix-02033bfc05a1e82b12e80c6d000e1724e910e899.tar.gz
guix-install.sh: Source both profiles, default user's and home.
* etc/guix-install.sh (sys_create_init_profile): Source both profiles, default user's and home.
-rwxr-xr-xetc/guix-install.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index ea10f35250..bbb4219965 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -11,6 +11,7 @@
# Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
# Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
# Copyright © 2022 Prafulla Giri <prafulla.giri@protonmail.com>
+# Copyright © 2023 Andrew Tropin <andrew@trop.in>
#
# This file is part of GNU Guix.
#
@@ -549,15 +550,19 @@ export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH"
# searches 'Info-default-directory-list'.
export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH"
-# GUIX_PROFILE: User's default profile
-# Prefer the one from 'guix home' if it exists.
+# GUIX_PROFILE: User's default profile and home profile
+GUIX_PROFILE="$HOME/.guix-profile"
+[ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
+[ -L "$GUIX_PROFILE" ] || \
+GUIX_LOCPATH="$GUIX_PROFILE/lib/locale:${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
+
GUIX_PROFILE="$HOME/.guix-home/profile"
-[ -L $GUIX_PROFILE ] || GUIX_PROFILE="$HOME/.guix-profile"
-[ -L $GUIX_PROFILE ] || return
-GUIX_LOCPATH="$GUIX_PROFILE/lib/locale"
+[ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
+[ -L "$GUIX_PROFILE" ] || \
+GUIX_LOCPATH="$GUIX_PROFILE/lib/locale:${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
+
export GUIX_LOCPATH
-[ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
EOF
}