On a linux machine, setting my environment variables in ~/.pam_environment saves me a lot of hassle, especially as I can keep my other dotfiles free of clutter and still get a shell-invariant environment. Is there some way to achieve this on macOS?
- Since
man pam_envgives me an entry in macOS, I thought populating~/.pam_environmentmight be possible, but to no effect. - I currently have a
~/.env.sh, which I source from.bashrcand.zshrc, but I am hoping for some canonical way to achieve this.