it’s to do with using the old version of nix, somehow i must have upgraded my version of nix resolving the issue
tested via podman run -it nixos/nix:2.18.5 sh
[nix-shell:~]$ cat flake.nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = {nixpkgs, ...}: {
nixosConfigurations.minimal = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{
boot.loader.grub.enable = false;
fileSystems."/" = {
device = "none";
fsType = "tmpfs";
};
system.stateVersion = "25.05";
}
];
};
};
}
[nix-shell:~]$ nix --version
nix (Nix) 2.18.5
[nix-shell:~]$ nix build .#nixosConfigurations.minimal.config.system.build.toplevel --extra-experimental-features nix-command --extra-experimental-features flakes
error: path '/nix/store/8lbv65x6gmjmrigpn7xb37wxdhb08whw-linux-6.12.20-modules-shrunk/lib' is not in the Nix store