not sourcing .bashrc
Closed this issue · 3 comments
The .bashrc have to be manually sourced everytime by command . ~/.bashrc
in fresh install with flake.
Even though I added user.shell = "${lib.getExe} pkgs.bash"
in nix-on-droid.nix
, applied by nix-on-droid switch --flake ~/.config/nix-on-droid
, logout and login, the .bashrc file is still not sourced.
Is it supposed to do it in nix way rather than manually created the ~/.bashrc
file? But how?
zsh have no problem sourcing ~/.zshrc though.
Thanks!
Can you try to use pkgs.bashInteractive
instead? The bash package is used for scripting and stuff, maybe it does not source the bashrc.
I tried both user.shell = "${lib.getExe} pkgs.bashInteractive"
and even deleting this line and run nix-on-droid switch --flake ~/.config/nix-on-droid
, login and logout, still not sourced.
I created ~/.bash_profile
file by command echo ". ~/.bashrc" > ~/.bash_profile
and now it works as expected.
Makes sense as we start bash as a login shell.
See https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html