Home Manager not found

I recently started getting this message when running home-manager switch --flake .:

Home Manager not found at /nix/store/vl5cx74q6n8m7dhxnyx1qpfgiwgifax2-source.

I am also getting this:

error: file 'home-manager/home-manager/build-news.nix' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)
~

Any thoughts?

same problem here (home-manager with flakes)

is this on nixos? did you use the flake to init like said here? Home Manager Manual
is home-manager managing itself? as this is about flake if in a git repo is every file tracked?

Currently I use Home Manager stand-alone via flake on macOS. I rebuild HM via home-manager switch --flake ~/.config/home-manager and update it via nix flake update ~/.config/home-manager. Every file is git-added.

Yes, this is on nixos. I have been running nixos for more than a year, and this just started happening.