-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
session's $PATH does not include nix-profile or cfg.sessionPath anymore #1999
Comments
Maybe |
I don't understand the purpose of the export $(/nix/store/…-systemd-247.6/lib/systemd/user-environment-generators/30-systemd-environment-d-generator) line. Why is it necessary? Edit: Looking at it a bit more I don't think calling |
@rycee This was added specifically as a universal mechanism to configure XDG system directory variables ( @xvello You should be able to override it with |
I would expect that I also expect that if intention of P.S. |
I agree that if we do decide to revert, let’s keep the XDG variables parts and only get rid of the |
@tadfisher instead of reverting everything, would it be enough to revert only what @terlar suggested? |
Yes, please do that. In principle perhaps |
@tadfisher do have the bandwidth to re-scope #2001 to just the 30-systemd-environment-d-generator part, or do you want me to open a PR to do so? My current workaround on ubuntu is to comment out the PATH export from |
I've udpated #2001 to revert the usage of |
#2001 was merged. Is there anything else that needs to be done? |
Works good now, my PATH has all expected elements in the right order. Thanks! |
When using
Notice that When I change my shell to
I am installing Any suggestions? P. S. Since my PATH contains several strange entries (I am switching from homebrew to nix) it might be that it's just my local issue with old Update: turns out to be LnL7/nix-darwin#122 |
Issue description
After upgrading home-manager today, the xsession
$PATH
does not include the right folders anymore. I am running KDE Neon (with a Ubuntu 20.04 system base).Although interactive shells have the right path, plasmashell and krunner cannot start applications installed via home-manager, as their $PATH is incorrect.
Logs from
~/.xsession-errors
:Before (correct, includes
~/.nix-profile/bin
and my custom~/.config/nixpkgs/bin
from cfg.sessionPath):After (incorrect):
Possible cause
I suspect a regression has been introduced by #1797, as my
hm-session-vars.sh
got this new line at the end:Running this script on my system resets
$PATH
to the hardcoded initial list matching my distribution's/etc/environment
file:Maintainer CC
@tadfisher author of #1797
@berbiche who reviewed and merged
Is it intentional to call
30-systemd-environment-d-generator
at the very end, or would it make sense to call it earlier, so thatcfg.sessionVariables
andcfg.sessionPath
can still override it?As sourcing the nix PATH is also done in sessionVariablesExtra, ordering them correctly might prove tricky.
Technical details
The text was updated successfully, but these errors were encountered: