I have previously installed some packages with guix install, and wanted to manage my home environment with guix home. I generated a home environment using guix home import which looked like this:
(use-modules (gnu home)
(gnu packages)
(gnu services)
(guix gexp)
(gnu home services shells))
(home-environment
;; Below is the list of packages that will show up in your
;; Home profile, under ~/.guix-home/profile.
(packages (specifications->packages (list "font-iosevka"
"fontconfig"
"glibc-locales"
"gcc-toolchain@14"
"emacs"
"openjdk@25")))
(services
(append (list (service home-bash-service-type
(home-bash-configuration
(aliases '())
(bashrc
(list (local-file
"/home/andrii/.config/guix-home/.bashrc"
"bashrc")))
(bash-logout
(list (local-file
"/home/andrii/.config/guix-home/.bash_logout"
"bash_logout"))))))
%base-home-services)))
I had a minimal bashrc which just set some prompt colors, and my Guix-managed dotfiles are as follows
.profile:
HOME_ENVIRONMENT=$HOME/.guix-home
. $HOME_ENVIRONMENT/setup-environment
$HOME_ENVIRONMENT/on-first-login
unset HOME_ENVIRONMENT
.bash_profile:
# Set up the system, user profile, and related variables.
# /etc/profile will be sourced by bash automatically
# Set up the home environment profile.
if [ -f ~/.profile ]; then source ~/.profile; fi
# Honor per-interactive-shell startup file
if [ -f ~/.bashrc ]; then source ~/.bashrc; fi
So just the standard ones.
Running emacs --version or java -version inside guix home container reports the correct versions, however, when I try to switch to that environment with guix home reconfigure my programs are no longer available. On logging out and back in, and after running guix home switch-generation on the generation number shown by guix home describe, my PATH is just
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
but in the container it is
/home/andrii/.guix-home/profile/bin:/home/andrii/.guix-home/profile/sbin:/gnu/store/mqyizk92llwp2fw579fljwzskswwkipa-home-system-profile/bin
which looks much more appropriate. What is going on here? How do I actually enter the home environment properly, and preferably do it on a login shell so that my packages are always available?