I followed the directions (I think!) but nix is still nix, not lix #491

Closed
opened 2024-08-28 17:28:41 +00:00 by bonds · 7 comments

Platform

  • Linux:
  • macOS
  • WSL

Additional information

I uninstall Nix following the directions at https://nix.dev/manual/nix/2.18/installation/uninstall for a multi user install. I rebooted. Then I reinstalled Nix. So, I had a fresh install. Then I installed Lix following the directions here: https://lix.systems/install/
but running nix --version shows I'm still running nix, not lix. Starting a fresh terminal instance doesn't help, rebooting doesn't help.

My nix config is available to read here: https://github.com/bonds/dotfiles/tree/main/.config/nix

The macos machine I'm trying to get lix working on is called 'accismus' and its running macos 14.6.1

Help! :) I'm happy to do more troubleshooting on my own if you can point me in the right direction, I suspect I'm doing something wrong here rather than it being a proper bug, but I don't know how to make further progress tracking down what's wrong...

Output

Output

$ nix --version
nix (Nix) 2.24.3

## Platform <!-- select the platform on which you tried to install Lix --> - [ ] Linux: <!-- state your distribution, e.g. Arch Linux, Ubuntu, ... --> - [x] macOS - [ ] WSL ## Additional information I uninstall Nix following the directions at https://nix.dev/manual/nix/2.18/installation/uninstall for a multi user install. I rebooted. Then I reinstalled Nix. So, I had a fresh install. Then I installed Lix following the directions here: https://lix.systems/install/ but running ```nix --version``` shows I'm still running nix, not lix. Starting a fresh terminal instance doesn't help, rebooting doesn't help. My nix config is available to read here: https://github.com/bonds/dotfiles/tree/main/.config/nix The macos machine I'm trying to get lix working on is called 'accismus' and its running macos 14.6.1 Help! :) I'm happy to do more troubleshooting on my own if you can point me in the right direction, I suspect I'm doing something wrong here rather than it being a proper bug, but I don't know how to make further progress tracking down what's wrong... ## Output <details><summary>Output</summary> ```log $ nix --version nix (Nix) 2.24.3 ``` </details>
Owner

Please get the output of which nix and post it here.

Please get the output of `which nix` and post it here.
Owner

also, doing something like:

nix-repl> :lf .
nix-repl> darwinConfigurations.accismus.config.nix.package

may be enlightening. if it's busted, look at options instead of config where you can pull out where that stuff is defined.

also, doing something like: ``` nix-repl> :lf . nix-repl> darwinConfigurations.accismus.config.nix.package ``` may be enlightening. if it's busted, look at options instead of config where you can pull out where that stuff is defined.
Author
$ which nix
/nix/var/nix/profiles/default/bin/nix

$ cd ~/.config/nix

$ nix repl
nix-repl> :lf .
Added 21 variables.

nix-repl> darwinConfigurations.accismus.config.nix.package
«derivation /nix/store/iin55gxprj6aci1q13bim42lb3izlvis-lix-2.91.0.drv»

# nix --version
nix (Nix) 2.24.3

$ echo $PATH
/Users/scott/bin/darwin /Users/scott/bin /Users/scott/.local/bin /Users/scott/.cargo/bin /Users/scott/.nix-profile/bin /nix/var/nix/profiles/default/bin /Users/scott/.nix-profile/bin /run/current-system/sw/bin /nix/var/nix/profiles/default/bin /usr/local/bin /usr/bin /usr/sbin /bin /sbin

Hmm. I wonder if my fish plugins might be messing something up.

$ fisher list
jorgebucaran/fisher
lilyball/nix-env.fish
patrickf1/fzf.fish

Yah, I wonder if lilyball/nix-env.fish is doing something wrong with my PATH. Lemme see...

$ fisher remove lilyball/nix-env.fish

and

$ nix --version
nix (Lix, like Nix) 2.91.0

Victory! Hmm, I wonder what niv-env had been doing...

$ echo $PATH
/Users/scott/bin/darwin /Users/scott/bin /Users/scott/.local/bin /Users/scott/.cargo/bin /Users/scott/.nix-profile/bin /run/current-system/sw/bin /nix/var/nix/profiles/default/bin /usr/local/bin /usr/bin /usr/sbin /bin /sbin

$ which nix
/run/current-system/sw/bin/nix

So, looks like it added /nix/var/nix/profiles/default/bin to my PATH before /run/current-system/sw/bin and so I wasn't getting the nix I wanted.

Thanks for the help!

```` $ which nix /nix/var/nix/profiles/default/bin/nix $ cd ~/.config/nix $ nix repl nix-repl> :lf . Added 21 variables. nix-repl> darwinConfigurations.accismus.config.nix.package «derivation /nix/store/iin55gxprj6aci1q13bim42lb3izlvis-lix-2.91.0.drv» # nix --version nix (Nix) 2.24.3 $ echo $PATH /Users/scott/bin/darwin /Users/scott/bin /Users/scott/.local/bin /Users/scott/.cargo/bin /Users/scott/.nix-profile/bin /nix/var/nix/profiles/default/bin /Users/scott/.nix-profile/bin /run/current-system/sw/bin /nix/var/nix/profiles/default/bin /usr/local/bin /usr/bin /usr/sbin /bin /sbin ```` Hmm. I wonder if my fish plugins might be messing something up. ```` $ fisher list jorgebucaran/fisher lilyball/nix-env.fish patrickf1/fzf.fish ```` Yah, I wonder if ```lilyball/nix-env.fish``` is doing something wrong with my PATH. Lemme see... ```` $ fisher remove lilyball/nix-env.fish ```` and ```` $ nix --version nix (Lix, like Nix) 2.91.0 ```` Victory! Hmm, I wonder what ``niv-env`` had been doing... ```` $ echo $PATH /Users/scott/bin/darwin /Users/scott/bin /Users/scott/.local/bin /Users/scott/.cargo/bin /Users/scott/.nix-profile/bin /run/current-system/sw/bin /nix/var/nix/profiles/default/bin /usr/local/bin /usr/bin /usr/sbin /bin /sbin $ which nix /run/current-system/sw/bin/nix ```` So, looks like it added ``/nix/var/nix/profiles/default/bin`` to my PATH before ``/run/current-system/sw/bin`` and so I wasn't getting the nix I wanted. Thanks for the help!
bonds closed this issue 2024-08-28 21:22:30 +00:00
Owner

The curious thing here is that the default profile contained nix 2.24 when you presumably wiped /nix? And our installer should have put a lix there. Anyway it may be worth uninstalling the nix 2.24 from that profile and putting either a lix or nothing in its place, in case nix-darwin breaks and you have to recover.

The curious thing here is that the default profile contained nix 2.24 when you presumably wiped /nix? And our installer should have put a lix there. Anyway it may be worth uninstalling the nix 2.24 from that profile and putting either a lix or nothing in its place, in case nix-darwin breaks and you have to recover.
jade added the
Status
invalid
label 2024-08-29 01:31:07 +00:00
Author

Hmm. I'm not sure I understand, but let see what I can figure out. Maybe you mean I could have uninstalled nix-darwin and just used the lix installer? https://git.lix.systems/lix-project/lix-installer

Anyhow, lemme poke around:

$ echo $PATH
/Users/scott/bin/darwin /Users/scott/bin /Users/scott/.local/bin /Users/scott/.cargo/bin /Users/scott/.nix-profile/bin /run/current-system/sw/bin /nix/var/nix/profiles/default/bin /usr/local/bin /usr/bin /usr/sbin /bin /sbin

$ nix-env --list-generations
<blank line...nothing>

$ cd /Users/scott/.local/state/nix/profiles
$ ls
<blank line...nothing>

$ ls /nix/var/nix/profiles/default/bin
nix          nix-collect-garbage  nix-env          nix-prefetch-url
nix-build    nix-copy-closure     nix-hash         nix-shell
nix-channel  nix-daemon           nix-instantiate  nix-store

So... @jade you are worried that because I installed nix-darwin before installing lix I have nixcpp sitting there, and ideally I should uninstall nix-darwin and just use the lix installer to avoid that?

Hmm. I'm not sure I understand, but let see what I can figure out. Maybe you mean I could have uninstalled nix-darwin and just used the lix installer? https://git.lix.systems/lix-project/lix-installer Anyhow, lemme poke around: ```` $ echo $PATH /Users/scott/bin/darwin /Users/scott/bin /Users/scott/.local/bin /Users/scott/.cargo/bin /Users/scott/.nix-profile/bin /run/current-system/sw/bin /nix/var/nix/profiles/default/bin /usr/local/bin /usr/bin /usr/sbin /bin /sbin $ nix-env --list-generations <blank line...nothing> $ cd /Users/scott/.local/state/nix/profiles $ ls <blank line...nothing> $ ls /nix/var/nix/profiles/default/bin nix nix-collect-garbage nix-env nix-prefetch-url nix-build nix-copy-closure nix-hash nix-shell nix-channel nix-daemon nix-instantiate nix-store ```` So... @jade you are worried that because I installed nix-darwin before installing lix I have nixcpp sitting there, and ideally I should uninstall nix-darwin and just use the lix installer to avoid that?
Owner

I'm just unsure what combination of the uninstall directions plus the lix installer caused that to be cppnix. you can nix-env --remove it and use nix-env to install lix in its place, no need to use the lix installer as the installation is otherwise obviously working fine.

maybe it was put there by the nix-darwin install process somehow? i have no idea.

it's not a big problem, you can ultimately just ignore it if you don't feel like doing anything about it.

I'm just unsure what combination of the uninstall directions plus the lix installer caused that to be cppnix. you can nix-env --remove it and use nix-env to install lix in its place, no need to use the lix installer as the installation is otherwise obviously working fine. maybe it was put there by the nix-darwin install process somehow? i have no idea. it's not a big problem, you can ultimately just ignore it if you don't feel like doing anything about it.
Owner

regarding why the nix-env command has confusing output, you need to use the --profile flag to specify that profile you're finding cppnix in; by default it looks at your user profile which doesn't have anything in it (which is normal).

regarding why the nix-env command has confusing output, you need to use the --profile flag to specify that profile you're finding cppnix in; by default it looks at your user profile which doesn't have anything in it (which is normal).
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#491
No description provided.