yaymukund’s weblog

Lix: path does not exist and cannot be created

I use Lix on aarch64-darwin without home-manager or nix-darwin. When I tried to upgrade my installation, I saw the error:

$ nix upgrade-nix
=> error: path '/nix/store/ggppip3wfx4vbdc0kxsdniw118viymdg-lix-2.93.2' does not exist and cannot be created

After going down the rabbithole, I figured out the issue. My nix.conf was missing two crucial lines:

# append to /etc/nix/nix.conf
substituters = https://cache.nixos.org https://cache.lix.systems
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=

For context, these lines are normally added by the Lix installer, but they weren’t in my conf. I think this is because my install predates lix-installer, but I am not sure.

After adding those lines, I was able to reboot the daemon and upgrade successfully:

$ sudo launchctl kickstart -k system/org.nixos.nix-daemon
$ sudo nix upgrade-nix
$ nix --version
nix (Lix, like Nix) 2.93.2
System type: aarch64-darwin

Hopefully, this saves someone else some time.