Error: Getting status of '/mnt/nix/store/[...]-source/pkgs': No such file or directory

I am trying to install my NixOS configuration to a virtual machine. It works fine on my already-installed system, but when I try to install it to the VM, I get an error I cannot figure out:

Also, I doubt the the disko trace warning at the top is related.

as you are using flakes with a dirty git index, is that folder by chance a new folder that you did not add to the git index? If yes you might want to add that to the index.

No, that’s because at the time I updated hardware-configuration.nix for the VM, but neglected to commit it. There were no untracked files.

Thank you, though.