Unable to rebuild NixOS: `modprobe: FATAL: Module nvme not found in directory`

There isn’t enough information here; we’d need to see your config. But judging by the error, I’m going to guess you’re trying to use linuxPackages from nixos-unstable on a stable version of NixOS. There was a change in the linux kernel nix expressions interface that makes this incompatible. See: Nixos-rebuild failed because of missing modules on kernel

But you shouldn’t need to get your kernel from nixos-unstable; kernel updates are backported to 25.05.