How to add PATH into systemd user (home-manager) service

The very dirty solution I just found is to do exactly what you described, declare your path as Environment=PATH=/run/current-system/sw/bin/ or /home/your_user/.nix-profile/bin/.

Very weird to me that it doesn’t work as it does with system services.

Edit:

The solution was right in front of my eyes the whole time:

I had read that thread before but didn’t quite understand that this is exactly what we were looking for.

1 Like