Nix troubleshooting

From wikinotes

broken on archlinux

Skip the AUR package and use official installer.

nix store empty/corrupt

nix-store --gc
nix-store --verify
nix-channel --update

nix packages won't build

First, try updating your channel and rebuilding.

nix-channel --update
nix-env -u

If you can isolate a package, try installing it outside of your project environment

nix-env -i neovim

Next, try upgrading nix itself, and then re-updating the channels

sudo nix upgrade-nix
nix-channel --update
nix-env -u

Finally if none of the above works, try re-installing nix by re-running the installer.
It will guide you on the uninstallation process, after which you can retry an install.
This resoled my un-buildable neovim issue.

See nix install.