replace nix upgrade-nix #10

Open
opened 2024-05-05 23:33:58 +00:00 by qyriad · 1 comment
Owner

nix upgrade-nix should be removed and users should simply re-run the installer to update on non-NixOS/nix-darwin

`nix upgrade-nix` [should be removed](https://git.lix.systems/lix-project/lix/issues/267#issuecomment-2559) and users should simply re-run the installer to update on non-NixOS/nix-darwin
Member

There are a few small changes to apply on top of CL2075, particularly in regards to doing "update" on Lix, but I think we can do some initial hacky version pretty much in that CL.

But before that, I'd like to discuss something. The CL uses nix-env CLI, which is infamously yucky. Here are a few concerns I have:

  1. The patched code checks if CppNix is installed with nix-env --query --installed -A nix, but uninstalls it with nix-env --uninstall nix; --uninstall can't be used with -A, and -A is a pretty big difference. I don't think it actually matters here, but is there a cleaner way?
  2. CppNix is upgraded to Lix in two commands: nix-env --uninstall nix, then nix-env -i <lix-from-tarball>. This is kinda ugly and creates an extra profile for no reason
  3. Lix is distributed in the lix-installer tarball, so upgrade would require manually downloading a new tarball, which is yucky until #13 is fixed
  4. We need to figure out lix-installer releng to push out newer versions with installation fixes, and ideally, teach lix-installer to update itself, to be more sure that it will work fine
There are a few small changes to apply on top of [CL2075](https://gerrit.lix.systems/c/lix-installer/+/2075), particularly in regards to doing "update" on Lix, but I think we can do some initial hacky version pretty much in that CL. But before that, I'd like to discuss something. The CL uses `nix-env` CLI, which is infamously yucky. Here are a few concerns I have: 1. The patched code checks if CppNix is installed with `nix-env --query --installed -A nix`, but uninstalls it with `nix-env --uninstall nix`; `--uninstall` can't be used with `-A`, and `-A` is a pretty big difference. I don't think it actually matters here, but is there a cleaner way? 2. CppNix is upgraded to Lix in two commands: `nix-env --uninstall nix`, then `nix-env -i <lix-from-tarball>`. This is kinda ugly and creates an extra profile for no reason 3. Lix is distributed in the `lix-installer` tarball, so upgrade would require manually downloading a new tarball, which is yucky until #13 is fixed 4. We need to figure out `lix-installer` releng to push out newer versions with installation fixes, and ideally, teach `lix-installer` to update itself, to be more sure that it will work fine
Sign in to join this conversation.
No labels
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-installer#10
No description provided.