diff --git a/gnu/home/services.scm b/gnu/home/services.scm index aa7beeb462d..453336c959a 100644 --- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -275,7 +275,8 @@ exported." (lambda (port) (set-port-encoding! port "UTF-8") (display "\ -HOME_ENVIRONMENT=$HOME/.guix-home +# NOTE: Set HOME_ENVIRONMENT before sourcing (home-shell-profile-service-type ensures +# ~/.profile does) GUIX_PROFILE=\"$HOME_ENVIRONMENT/profile\" PROFILE_FILE=\"$GUIX_PROFILE/etc/profile\" [ -f $PROFILE_FILE ] && . $PROFILE_FILE @@ -301,6 +302,9 @@ case $XCURSOR_PATH in *) export XCURSOR_PATH=$GUIX_PROFILE/share/icons:$XCURSOR_PATH ;; esac +# Keep the shell environment clean. +unset GUIX_PROFILE PROFILE_FILE + " port) (display #$(environment-variable-shell-definitions vars) diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index ee6b09f17c3..bab5730c3d6 100644 --- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -89,7 +89,8 @@ really know what you do.")) "\ HOME_ENVIRONMENT=$HOME/.guix-home . $HOME_ENVIRONMENT/setup-environment -$HOME_ENVIRONMENT/on-first-login\n" +$HOME_ENVIRONMENT/on-first-login +unset HOME_ENVIRONMENT\n" (serialize-configuration config (filter-configuration-fields