environment.variables = {
PATH = builtins.getEnv “PATH” + “:~/.local/bin”;
};
when i echo $PATH ~/.local/bin is included in there
maybe it gets added to late in the startup process
it is important that this gets added to the path before major applications like my i3 WM gets launched from an shell
i had it work on my 23.11 installation
but after updating
the files are no longer available
I am not using flakes and no homemanager
These variables will be set on shell initialisation (e.g. in /etc/profile).
AI tells me that /etc/profile is read at login. If you need PATH, or some other environment variable set as a service starts maybe you should rather have a look at adding it to its systemd unit file? Something like this maybe?
Thank you very much for looking into this i will try your suggestion but i have never worked with systemd before
what i tried since the creation of the post is [NixOS Search]
Don’t use getEnv in your config, it’s impure and will cause you more headaches.
How you approach this depends on whether you want those binaries available for interactive use, in scripts, in systemd services, etc.
Also, I believe ~ is a shell builtin, you probably want $HOME.