mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
home: services: Unset variables after profile init.
While they aren’t exported, these temporary variables show up in the resulting shell, cluttering tab completion and declare -p. * gnu/home/services.scm (environment-variables->setup-environment-script): Unset shell variables. * gnu/home/services/shells.scm (add-shell-profile-file): Likewise. Change-Id: Ibb634849d9f38c1a9a44c0d493e92231364de958 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
890fe50d9b
commit
50a2d73eac
2 changed files with 7 additions and 2 deletions
|
@ -275,7 +275,8 @@ exported."
|
||||||
(lambda (port)
|
(lambda (port)
|
||||||
(set-port-encoding! port "UTF-8")
|
(set-port-encoding! port "UTF-8")
|
||||||
(display "\
|
(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\"
|
GUIX_PROFILE=\"$HOME_ENVIRONMENT/profile\"
|
||||||
PROFILE_FILE=\"$GUIX_PROFILE/etc/profile\"
|
PROFILE_FILE=\"$GUIX_PROFILE/etc/profile\"
|
||||||
[ -f $PROFILE_FILE ] && . $PROFILE_FILE
|
[ -f $PROFILE_FILE ] && . $PROFILE_FILE
|
||||||
|
@ -301,6 +302,9 @@ case $XCURSOR_PATH in
|
||||||
*) export XCURSOR_PATH=$GUIX_PROFILE/share/icons:$XCURSOR_PATH ;;
|
*) export XCURSOR_PATH=$GUIX_PROFILE/share/icons:$XCURSOR_PATH ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Keep the shell environment clean.
|
||||||
|
unset GUIX_PROFILE PROFILE_FILE
|
||||||
|
|
||||||
" port)
|
" port)
|
||||||
(display
|
(display
|
||||||
#$(environment-variable-shell-definitions vars)
|
#$(environment-variable-shell-definitions vars)
|
||||||
|
|
|
@ -89,7 +89,8 @@ really know what you do."))
|
||||||
"\
|
"\
|
||||||
HOME_ENVIRONMENT=$HOME/.guix-home
|
HOME_ENVIRONMENT=$HOME/.guix-home
|
||||||
. $HOME_ENVIRONMENT/setup-environment
|
. $HOME_ENVIRONMENT/setup-environment
|
||||||
$HOME_ENVIRONMENT/on-first-login\n"
|
$HOME_ENVIRONMENT/on-first-login
|
||||||
|
unset HOME_ENVIRONMENT\n"
|
||||||
(serialize-configuration
|
(serialize-configuration
|
||||||
config
|
config
|
||||||
(filter-configuration-fields
|
(filter-configuration-fields
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue