Skip to content
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

nixos/nix-channel: don't set nix-path #327683

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Conversation

nbraud
Copy link
Contributor

@nbraud nbraud commented Jul 16, 2024

Description of changes

Do not set an empty nix-path (in nix.conf) when ! nix.channel.enable.

Otherwise, nix will ignore the NIX_PATH environment variable, and by extension the nix.nixPath NixOS option.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nixpkgs-review
    Only nixos-install-tools would be rebuilt, but it is blacklisted in nixpkgs-review.
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Module updates) Added a release notes entry if the change is significant
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Otherwise, the empty path in `nix.conf` takes precedence over `NIX_PATH`,
and by extension the `nix.nixPath` configuration option.

Introduced in 61afc4d.
Copy link
Member

@mkg20001 mkg20001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, im just unsure if there was any reason for that default edit: seen commit message

@nbraud nbraud merged commit 9587ddd into NixOS:master Jul 26, 2024
26 checks passed
@nbraud nbraud deleted the nixos/channel branch July 26, 2024 19:19
@nbraud
Copy link
Contributor Author

nbraud commented Jul 26, 2024

Thanks for the review <3

bwkam pushed a commit to bwkam/nixpkgs that referenced this pull request Jul 26, 2024
Otherwise, the empty path in `nix.conf` takes precedence over `NIX_PATH`,
and by extension the `nix.nixPath` configuration option.

Introduced in 61afc4d.
@r-vdp
Copy link
Contributor

r-vdp commented Jul 28, 2024

There was work ongoing regarding this also in #323613, @CyberShadow, @roberth.

That being said, I had this patch added to my nixpkgs for a long time now.

@CyberShadow
Copy link
Contributor

@mkg20001 @nbraud I believe @roberth objected to making this change by itself: #273170 (review)

So, it may make sense to revert this pull request.

@roberth
Copy link
Member

roberth commented Jul 28, 2024

I've merged #323613 which implements the first mitigation

print a clear warning in the activation script if the channel data still exists in /nix/var/... and can therefore still be found by Nix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants