MacOS does not source shell configuration for GUI apps. It means that settings done in Home Manager with sessionVariables are available only to apps started from a terminal. It may be helpful to allow home-manager modules to set variables for user environment GUI apps. In the example linked, environment variables are set that allow to run Firefox installed from homebrew with Home Manager generated profiles.ini. But this doesn't work when Firefox is executed from MacOS UI (it does work when it's executed from a shell.)
Right now, to make this work, I have to duplicate the same setting in my setup flake - for launchd and for home-manager. I'd prefer if we could configure it once (automatically by the Home Manager module, see the PR linked) and get the setting propagated to GUI startup.
MacOS does not source shell configuration for GUI apps. It means that settings done in Home Manager with
sessionVariables
are available only to apps started from a terminal. It may be helpful to allow home-manager modules to set variables for user environment GUI apps. In the example linked, environment variables are set that allow to run Firefox installed from homebrew with Home Manager generatedprofiles.ini
. But this doesn't work when Firefox is executed from MacOS UI (it does work when it's executed from a shell.)Right now, to make this work, I have to duplicate the same setting in my setup flake - for launchd and for home-manager. I'd prefer if we could configure it once (automatically by the Home Manager module, see the PR linked) and get the setting propagated to GUI startup.