Next: , Previous: , Up: Home Configuration   [Contents][Index]


11.2 Configuring the Shell

This section is safe to skip if your shell or shells are managed by Guix Home. Otherwise, read it carefully.

There are few scripts that must be evaluated by a login shell to activate the home environment, the startup files only read by login shells often have profile suffix. For more information about login shells see Invoking Bash in The GNU Bash Reference Manual and see Bash Startup Files in The GNU Bash Reference Manual.

The first script is setup-environment, which sets all the necessary environment variables (including variables declared by user) and the second one is on-first-login, which starts Shepherd for the current user and performs some other actions declared in the file with home-environment record.

Guix Home will always create ~/.profile, which contains the following lines:

HOME_ENVIRONMENT="/home/USER/.guix-home"
. $HOME_ENVIRONMENT/setup-environment
guile $HOME_ENVIRONMENT/on-first-login

That makes POSIX compliant login shells activate the home environment. However, in most cases this file won’t be read by most modern shells, because they are run in non POSIX mode by default and have their own *profile startup files. For example Bash will prefer ~/.bash_profile in case it exists and only if it doesn’t will it fallback to ~/.profile. Zsh (if no additional options specified) will ignore ~/.profile, even if ~/.zprofile doesn’t exist.

To make your shell respect ~/.profile, add . ~/.profile or source ~/profile to the startup file for the login shell. In case of Bash, it is ~/.bash_profile, and in case of Zsh, it is ~/.zprofile.

Note: This step is only required if your shell is NOT managed by Guix Home. Otherwise, everything will be done automatically.


Next: , Previous: , Up: Home Configuration   [Contents][Index]