I've read that
.zshrc) is meant only for interactive logins (and the one non-interactive exception of remote shells). But where should environment variables for Bash be placed that is (roughly) equivalent to
That would be the
$BASH_ENV environment variable.
info bash BASH_ENV:
If this variable is set when Bash is invoked to execute a shell script, its value is expanded and used as the name of a startup file to read before executing the script. *Note Bash Startup Files::.
So you'd set that variable to
~/.bashenv for instance in your
~/.profile for all non-interactive bash instances though not the ones invoked as
sh to interpret code in that file upon startup.
To do that for interactive ones as well, you can add a
source ~/.bashenv to your
~/.bashrc (maybe also in your
~/.bash_profile if it doesn't already source your
~/.bashrc when interactive).