running nix profile against /nix/var/nix/profiles/default breaks nix upgrade-nix #16

Closed
opened 2024-03-11 06:17:43 +00:00 by jade · 4 comments
Owner

The cause for this is that nix upgrade-nix shells out to nix-env, which explodes if the default profile was from nix profile.

I fixed someone's Nix install with this:

sudo nix-env --profile /nix/var/nix/profiles/default --remove-all -f '<nixpkgs>' -i /nix/store/4xwvps7bnachw9686ac22jhczn04i44b-nix-2.20.5 $(nix-build --no-out-link '<nixpkgs>' -A cacert)

Wondering if we should have a command that unbreaks this particular hilarious issue.

The cause for this is that `nix upgrade-nix` shells out to `nix-env`, which explodes if the default profile was from `nix profile`. I fixed someone's Nix install with this: ``` sudo nix-env --profile /nix/var/nix/profiles/default --remove-all -f '<nixpkgs>' -i /nix/store/4xwvps7bnachw9686ac22jhczn04i44b-nix-2.20.5 $(nix-build --no-out-link '<nixpkgs>' -A cacert) ``` Wondering if we should have a command that unbreaks this particular hilarious issue.
Owner

Wondering if we should have a command that unbreaks this particular hilarious issue

This could be part of some general analogue to things like brew doctor

> Wondering if we should have a command that unbreaks this particular hilarious issue This could be part of some general analogue to things like `brew doctor`
Author
Owner

nix doctor exists

`nix doctor` exists
jade added this to the v2.90 milestone 2024-03-14 06:35:05 +00:00
Author
Owner

see also #17

i think that this kind of maintenance should actually be the job of the installer.

see also https://git.lix.systems/lix-project/lix/issues/17 i think that this kind of maintenance should actually be the job of the installer.
Owner

Or if not the job of the installer then maybe nix upgrade-nix should just transparently handle either kind of profile

Or if not the job of the installer then maybe `nix upgrade-nix` should just transparently handle either kind of profile
qyriad was assigned by ktemkin 2024-04-27 01:33:41 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#16
No description provided.