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

nix upgrade-nix: Support new profiles #12165

Open
2 tasks
edolstra opened this issue Jan 9, 2025 · 0 comments
Open
2 tasks

nix upgrade-nix: Support new profiles #12165

edolstra opened this issue Jan 9, 2025 · 0 comments
Assignees
Labels
feature Feature request or proposal

Comments

@edolstra
Copy link
Member

edolstra commented Jan 9, 2025

Is your feature request related to a problem?

Currently nix upgrade-nix fails on profiles that have been modified by nix profile, typically with a misleading error message like:

error: directory '"/nix/store/46p1z0w9ad605kky62dr53z4h24k2a5r-nix-2.25.3/bin/nix"' does not appear to be part of a Nix profile

DeterminateSystems/nix-installer#1362

Proposed solution

If the profile has a manifest.json file, use nix profile to upgrade the Nix package. It's not entirely clear what the behaviour should be, but probably something like:

  • If the profile element providing nix is a store path, then upgrade it to the store path returned by getLatestNix().
  • Otherwise do the equivalent of nix profile upgrade <element>.

Alternative solutions

Additional context

Checklist


Add 👍 to issues you find important.

@edolstra edolstra added the feature Feature request or proposal label Jan 9, 2025
@edolstra edolstra self-assigned this Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request or proposal
Projects
None yet
Development

No branches or pull requests

1 participant