From fab73a67804780d8732cb56d93dfc6d5831e577c Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Tue, 21 May 2024 21:00:13 +0100 Subject: [PATCH] bash: more guix profile stuff --- bashrc.d/guix.bash | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bashrc.d/guix.bash b/bashrc.d/guix.bash index ad66f9f..e7885a4 100644 --- a/bashrc.d/guix.bash +++ b/bashrc.d/guix.bash @@ -1,10 +1,15 @@ which guix 1>/dev/null if [ $? -eq 0 ] ; then if [ -d "$HOME/.config/guix/" ] ; then - GUIX_PROFILE="$HOME/.config/guix/current" + export GUIX_PROFILE="$HOME/.config/guix/current" + export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" . "$GUIX_PROFILE/etc/profile" else echo "No current GUIX_PROFILE." fi fi - +if [ -n "$GUIX_ENVIRONMENT" ]; then + if [[ $PS1 =~ (.*)"\\$" ]]; then + PS1="${BASH_REMATCH[1]} [env]\\\$ " + fi +fi