(address . bug-guix@gnu.org)
Hi guix' !
I have been trying to use guix home on my foreign distro partition
(manjaro); especially in order to set up additional profiles from
there, but my .bash_profile generated by guix doesn't seem to be
evaluated at all.
To describe the actual issue finally: None of the things that should happen through .bash_profile seem to
happen at the moment (it's just about different environment variables that
will not be set up.), but after running bash --login in my
terminal-emulator everything is as anticipated so my guess is that
.bash_profile actually isn't evaluated at all after login. I'm happy to hear
other suggestions and especially solutions.
I will attach the file that I use
for home configuration, as well as the current resulting .bashrc,
.bash_profile and .profile files.
I'm aware that there is duplicated code by the generated aliases in
.bashrc and that the prompt customization for guix profiles added by
the "guix-defaults?" field does not work due to other related code that comes afterwards but I'm not sure it's related to that main issue.
I did the original set up using "guix home import" which seems to have
improved since I tried last in december last year when the generated
file didn't work at all.
Manjaro has a lot of stuff in it's .bashrc that i didn't want to
override, and maybe there are more cases of duplication there that I
don't know about what harm they might introduce.
Greetings, Florian
(use-modules
(gnu home)
(gnu packages)
(gnu packages base)
(gnu services)
(guix gexp)
(gnu home services shells))
(define %enable-extra-profiles
(plain-file "enable-profiles"
"for i in $GUIX_EXTRA_PROFILES/*; do
profile=$i/$(basename \"$i\")
if [ -f \"$profile\"/etc/profile ]; then
GUIX_PROFILE=\"$profile\"
. \"$GUIX_PROFILE\"/etc/profile
fi
unset profile
done"))
(home-environment
(services
(list (service
home-bash-service-type
(home-bash-configuration
(environment-variables
'(("GUIX_EXTRA_PROFILES" . "/home/flo/.extra-profiles")
;;("ALTERNATE_EDITOR" . "\"\"")
("EDITOR" . "\"emacsclient -nw -q\"")
("VISUAL" . "\"emacsclient -c -a \"\"\"")
("GIT_EDITOR" . "\"emacs -nw -q\"")))
(aliases
'(("cp" . "cp -i")
("df" . "df -h")
("egrep='egrep --colour" . "auto")
("fgrep='fgrep --colour" . "auto")
("free" . "free -m")
("grep='grep --colour" . "auto")
("ls='ls --color" . "auto")
("more" . "less")
("np" . "nano -w PKGBUILD")))
(bashrc
(list (local-file
"/home/flo/.config/guix/home/.bashrc"
"bashrc")))
(bash-profile
(list %enable-extra-profiles))
(bash-logout
(list (local-file
"/home/flo/.config/guix/home/.bash_logout"
"bash_logout"))))))))
HOME_ENVIRONMENT=$HOME/.guix-home
. $HOME_ENVIRONMENT/setup-environment
$HOME_ENVIRONMENT/on-first-login
# Setups system and user profiles and related variables
# /etc/profile will be sourced by bash automatically
# Setups home environment profile
if [ -f ~/.profile ]; then source ~/.profile; fi
# Honor per-interactive-shell startup file
if [ -f ~/.bashrc ]; then source ~/.bashrc; fi
for i in $GUIX_EXTRA_PROFILES/*; do
profile=$i/$(basename "$i")
if [ -f "$profile"/etc/profile ]; then
GUIX_PROFILE="$profile"
. "$GUIX_PROFILE"/etc/profile
fi
unset profile
done
export GUIX_EXTRA_PROFILES=/home/flo/.extra-profiles
export EDITOR="emacsclient -nw -q"
export VISUAL="emacsclient -c -a """
export GIT_EDITOR="emacs -nw -q"