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

Installer bootstrapping issue due to nix 2.20.3 missing from nixpkgs #10109

Open
3 tasks done
e-nikolov opened this issue Feb 28, 2024 · 4 comments
Open
3 tasks done

Installer bootstrapping issue due to nix 2.20.3 missing from nixpkgs #10109

e-nikolov opened this issue Feb 28, 2024 · 4 comments

Comments

@e-nikolov
Copy link
Contributor

e-nikolov commented Feb 28, 2024

If I install nix via the installer, I get nix v2.20.3, which has a new profile manifest version (3).

However, nixpkgs currently only has nix v2.19.3, which still uses the old manifest.

When dealing with a new machine, I usually install nix via the installer and then use home-manager to declaratively manage/update it. Right now, however because nix v2.20.3 is not yet available on nixpkgs, home-manager installs a version of nix that does not understand the new manifest version and I get errors:

Starting Home Manager activation
warning: unknown setting 'upgrade-nix-store-path-url'
warning: unknown setting 'upgrade-nix-store-path-url'
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
warning: unknown setting 'upgrade-nix-store-path-url'
error: profile manifest '/home/test/.local/state/nix/profiles/profile/manifest.json' has unsupported version 3
warning: unknown setting 'upgrade-nix-store-path-url'
error: profile manifest '/home/test/.local/state/nix/profiles/profile/manifest.json' has unsupported version 3

The same issue would happen if I directly use nix profile install instead of home-manager.

Platform

  • Linux:
  • macOS
  • WSL

Priorities

Add 👍 to issues you find important.

@e-nikolov e-nikolov changed the title Profile manifest version issue Installer bootstrapping issue due to nix 2.20.3 missing from nixpkgs Feb 28, 2024
@e-nikolov
Copy link
Contributor Author

e-nikolov commented Feb 28, 2024

Simpler reproduction steps:

# 1. Create a new ubuntu WSL VM and start a bash session
# 2. Install nix

sh <(curl -L https://nixos.org/nix/install) --daemon

# 3. Restart the session / source ~/.bashrc so that nix becomes available

nix --version 
# Output:
# nix (Nix) 2.20.4

# 4. Install nix via nix

nix --extra-experimental-features nix-command --extra-experimental-features flakes install nixpkgs#nix

# 5. Restart the session so that nix from the local profile becomes available

nix --version 
# Output:
# nix (Nix) 2.18.1

# 6. Try to install anything else via nix

nix --extra-experimental-features nix-command --extra-experimental-features flakes profile install nixpkgs#hello
# Output:
# error: profile manifest '/home/test/.local/state/nix/profiles/profile/manifest.json' has unsupported version 3

@horriblename
Copy link

is there a temporary fix for this?

@e-nikolov
Copy link
Contributor Author

e-nikolov commented Mar 2, 2024

is there a temporary fix for this?

I guess a workaround would be to either:

  • not install a second version of nix via home-manager/profile install
  • use an older version of the nix installer to get the same version of nix available in nixpkgs

thufschmitt added a commit that referenced this issue Mar 5, 2024
Try and prevent the situation of #10109 to happen again in the future
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-03-04-nix-team-meeting-minute-130/40830/1

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

No branches or pull requests

5 participants