-
-
Notifications
You must be signed in to change notification settings - Fork 15.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
NIX_PATH is polluted when setting nix.nixPath #55273
Comments
Eek, sorry! Forest for the trees. So the problem is that currently no matter what Previously we incorrectly added unexpanded '$HOME/.nix-defexpr/channels' which is no good although I think mostly caused nix to complain a lot (and lack of channels on The clean-simple solution is to delete the extraInit (and don't put it in sessionVariables as it was either). And then solve that problem as we think best.. basically re-open #38351 and try again. Thoughts? |
Err I'll clarify that reverting both my commit and the one for #38351 is meant to be the suggested baseline to solve this from (instead of plumbing more complications) but may not be a good state to actually have |
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:
|
Hmm, I may have misunderstood your issue I'm sorry. The ability to explicitly set exactly what NIX_PATH ends up as.. seems like a reasonable offering! 😸 If I understand the problem is that now NIX_PATH gets values both when setting It seems fixing this is straightforward enough, the question is what is the desired/expected behavior. And the documentation should likely clarify either way :). Also, sorry any of this broke things for you! Thoughts? :) |
Today I discovered that this change introduced inconsistent behavior, and is therefore even breaking for new users of I've spent a lot of time searching where the difference could come from, but I am at loss here. There are only two places where
|
Oh boy, the description of my experiment was flawed, and that made it more confusing.
This is not correct. It is true for the following: login as In any case I still perceive the behavior as broken. At first I thought about fixing this the straightforward way and just also check |
I marked this as stale due to inactivity. → More info |
For a fixed NIX_PATH, I create a symlink in the system so that the path remains the same between activations. Here's what I put in a flake:
As for updating environment variables, see #161358 |
I see that Is it assumed to be then safe to deleted the |
f3a114e
This recent commit means that setting
nix.nixPath
does not fix the value ofNIX_PATH
. Now it is alsopolluted with this reference to
~/.nix-defexpr/channels
which has now caused breakage for me on two different machines.The original commit didn't have this intent I believe as it was only intended to modify
NIX_PATH
ifnix.nixPath
wasn't set.@dtzWill
The text was updated successfully, but these errors were encountered: