-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Broken NIX_PATH
tracking issue
#9574
Comments
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/disabling-channels-breaks-nix-path-resolution/34825/3 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nix-path-is-not-recognized/38404/6 |
See: NixOS/nix#9574 Signed-off-by: Linda Siemons <linda@catbrained.dev>
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-04-22-nix-team-meeting-minutes-141/44083/1 |
@roberth @fricklerhandwerk I'm happy to take another swing at this one. Seems like https://github.com/NixOS/nix/pull/9066/files should probably be used as a starting point for testing. w.r.t. your comment here #8902 (comment) it seems like you are saying that there is probably some issue with what I did in this pr, w.r.t. the interaction between NIX_PATH and restrict-eval, but its not quite clear to me what exactly the issue is, and whether you and @thufschmitt ever did sit down and figure out a resolution or not. Just want to make sure that I'm not missing any details that you guys worked out or decided on before I spend more time on this. Happy to jump on a call or discuss over text chat or something as well. Thanks! |
Would also be happy to use #7871 as a starting point if we feel like that is a better route. I don't have a super strong recollection of what I even did in my PR, but I do vaguely recall that it did have the advantage of having a more "correct" version of the behavior w.r.t. precedence of the command line arguments. |
@colonelpanic8 thanks a lot, I appreciate your support! Feel free to join the maintainer meetings if you'd like to talk. We did sit down, which resulted in the top post of #9066 that describes the expected behavior, which is currently violated. It should be tested exhaustively and then fixed. We discussed last time (and the details aren't written down because there were too many) that the test setup as it is stands in the way to do this cleanly, and we'd like to first see how to approach that. |
@fricklerhandwerk oh, wait so it seems like you just happened to pick this up again recently? I had assumed that since so much time had passed since the creation of #9066 that no one was actively working on this and that there may not even be any plans to fix the issue. I'm definitely eager to help out here (this issue is kind of a major annoyance for me) but if you are already actively working on fixing the issue (and it sounds like maybe you have plans to pair on it with eelco), I wonder if I might just be stepping on toes by involving myself. I'd love to hear your honest opinion on whether my involvement would be helpful at this stage. I'm definitely happy to attend the meeting, and work on any parts of this (even if they are tedious as with the testing). |
I have the suspicion that the search.nixos.org import broke because of this https://github.com/NixOS/nixos-search/actions/runs/8851738555/job/24308951178 Discussion in matrix https://matrix.to/#/!RROtHmAaQIkiJzJZZE:nixos.org/$CW01HdjRSMSyxXZlVw5cHassVIidQBjYDN8sAqDcR54?via=nixos.org&via=matrix.org&via=nixos.dev |
This would be an exaggeration. It's on my mind and I dabbled at it, but I didn't make progress. Talking it through and walking through the code with someone would definitely help with that. But don't rely on me. Feel free to make your own investigations and discuss them here or as pull requests. |
While this is definitely a Nix bug, I'd argue that the NixOS module is broken as well: The However, even with both of these fixed, I'd argue that the general behavior and interaction between these two would be suboptimal and surprising: If one configures the Nix path through |
- Removed top level `with` declarations - Applied workaround for nixPath, NixOS/nix#9574 - Moved repeated settings into global config files - Replaced tree in favor of eza in fzf change directory widget - Made tmux switch window keybindings actually execute properly - Removed custom zsh-autosuggestion highlight option, use the defaults - Made plasma-manager modify icon theme again - Removed cmatrix - Added several packages - fd - procs - nixd - Doom Emacs modifications - Added zoxide.el package - Added ibuffer module - Make Home-Manager NixOS module use global packages - Switched to sunshine nixos module - Simplify nixpkgs import for shell and custom packages - Added btop GPU flags - Added more history filters for atuin - Fixed btop theme conflict for live-image build
- Removed top level `with` declarations - Applied workaround for nixPath, NixOS/nix#9574 - Moved repeated settings into global config files - Replaced tree in favor of eza in fzf change directory widget - Made tmux switch window keybindings actually execute properly - Removed custom zsh-autosuggestion highlight option, use the defaults - Made plasma-manager modify icon theme again - Removed cmatrix - Added several packages - fd - procs - nixd - Doom Emacs modifications - Added zoxide.el package - Added ibuffer module - Make Home-Manager NixOS module use global packages - Switched to sunshine nixos module - Simplify nixpkgs import for shell and custom packages - Added btop GPU flags - Added more history filters for atuin - Fixed btop theme conflict for live-image build
- Removed top level `with` declarations - Applied workaround for nixPath, NixOS/nix#9574 - Moved repeated settings into global config files - Replaced tree in favor of eza in fzf change directory widget - Made tmux switch window keybindings actually execute properly - Removed custom zsh-autosuggestion highlight option, use the defaults - Made plasma-manager modify icon theme again - Removed cmatrix - Removed wezterm tmux-on configuration - Wezterm on configuration only loads when NOT using tmux - Added several packages - fd - procs - nixd - Doom Emacs modifications - Added zoxide.el package - Added ibuffer module - Make Home-Manager NixOS module use global packages - Switched to sunshine nixos module - Simplify nixpkgs import for shell and custom packages - Added btop GPU flags - Added more history filters for atuin - Fixed bat theme conflict for live-image build
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/24-05-add-flake-to-nix-path/46310/11 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-06-05-nix-team-meeting-minutes-150/46583/1 |
Disabling nix.channel.enable makes nix-path default to an empty string. Due to NixOS/nix#9574 this overrides the NIX_PATH environment variable, meaning <nixpkgs> lookup paths fail to resolve. Workaround by setting nix-path explicitly until it is fixed.
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/why-is-an-older-version-of-an-app-getting-installed-here/49413/7 |
Describe the bug
NIX_PATH
environment variable does not work whennix.conf
has anix-path
setting.This is highly unexpected and not intentional.
Multiple issues and PRs exist, but solving this problem has proven difficult within the established abstractions for settings handling.
Issues
nix-env --query --available
does not followNIX_PATH
#8784PRs
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: