-
Notifications
You must be signed in to change notification settings - Fork 54
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 can get out of date #5
Comments
This is a known issue (at least to me) that NIX_PATH fails to update due to other applications not re-sourcing I actually never considered that it ever worked differently since I initially moved to flakes quite early on and never paid that much attention to it, but I believe I can fix it by reverting some of the NIX_PATH logic. Keep in mind that the issue will persist when adding/removing flakes, but I will definitely make sure that at least some of the flakes will use a static path instead. You can expect a fix today/tomorrow |
Also, I created a discussion here: https://discourse.nixos.org/t/i-feel-like-nix-path-creates-more-issues-than-it-fixes/12110, I wonder what are other peeps thoughts on this. |
As commit notes - removed custom NIX_PATH implementation. Does not seem to be too relevant in the new world of flakes |
Sure, I'll do it myself again. The solution posted on discourse is nice, it saves a slow derivation from what I used to do. |
For anyone stumbling upon this issue later: this is how I ended up solving it in my flake: https://github.com/chvp/nixos-config/blob/17a4f0a7a104ad263f5e361f57e18c6a5009eca5/flake.nix#L22-L25 |
If the system is updated while a user is logged in, their NIX_PATH variable can get out of date when using the
saneFlakeDefaults
. This can get noticeable if one updates through a full rebuild on a graphical system, resulting in graphical applications accessed through anix-shell
refusing to start. I solved this this way in my flake: https://github.com/chvp/nixos-config/blob/f3a7f168d5bc46fb5d9c7946b59bed327cf1e609/flake.nix#L28-L33 (the.version-suffix
file is also useful,nix-direnv
relies on it to do its caching).The text was updated successfully, but these errors were encountered: