back to main page

Table of content

Reason I'm doing this

Okay so, my laptop just died and i tried to just install a new NixOS 24.05 (because that was the version I originally used) and then build my flakes, but unfortunately it always failed with the same error message:

error: path ‘/nix/store/9y7z0wj024np8zrhwvpz6ph6ksckiwgy-linux-6.12.20-modules-shrunk/lib’ is not in the Nix store

How do I fix this? :(

I found the solution to this problem here.

Simply just install NixOs 24.05, then run

sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos

followed by

sudo nixos-rebuild-switch --upgrade

With that, the NixOs version should be on the newest unstable and can then be rebuilt using the flakes from my repo.

Other considerations

One thing to also consider, is to copy the autogenerated hardware-config from /etc/nixos/hardware-configuration.nix to the flakes repo in ~/flakes/hosts/nixos/hardware-configuration.nix.

Without this, NixOs will still not work ^^