Recently Home Manager has stopped working with my flake. I tried boiling it down to a minimal flake and it still breaks:
$ home-manager build --flake .#ashley
Home Manager not found at /nix/store/v638jyhpyw8xrml0sk62aryr01wwx129-source.
warning: Git tree '/home/ashley/Projects/TestHM' is dirty
warning: creating lock file '/home/ashley/Projects/TestHM/flake.lock'
warning: Git tree '/home/ashley/Projects/TestHM' is dirty
trace: warning: optionsDocBook is deprecated since 23.11 and will be removed in 24.05
trace: warning: optionsDocBook is deprecated since 23.11 and will be removed in 24.05
trace: warning: optionsDocBook is deprecated since 23.11 and will be removed in 24.05
warning: Git tree '/home/ashley/Projects/TestHM' is dirty
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)
Is anyone else seeing this sort of thing, or am I doing something wrong? In any case I created an issue for it with more details.
It occasionally does this for me, showing the error: file build-news-nix part, but it doesn’t actually fail. It correctly deploys everything, on a second run it then doesn’t even show that error anymore.
$ home-manager build --flake .#ashley
Home Manager not found at /nix/store/v638jyhpyw8xrml0sk62aryr01wwx129-source.
warning: Git tree '/home/ashley/Projects/TestHM' is dirty
warning: creating lock file '/home/ashley/Projects/TestHM/flake.lock'
warning: Git tree '/home/ashley/Projects/TestHM' is dirty
trace: warning: optionsDocBook is deprecated since 23.11 and will be removed in 24.05
trace: warning: optionsDocBook is deprecated since 23.11 and will be removed in 24.05
trace: warning: optionsDocBook is deprecated since 23.11 and will be removed in 24.05
warning: Git tree '/home/ashley/Projects/TestHM' is dirty
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)
I was able to build this no problem in a clean virtual machine
the only problem was that i obviously had no home-manager command, so instead i did nix run home-manager -- build --flake .#ashley, which brought freshest home-manager from git
And that gives me a thought that maybe your currently installed home-manager command is incompatible with newest changes in repo, or, judging from that it could not find something - not all parts of home-manager are properly rooted so they got cleaned by garbage collection, so that home-manager command stopped working? here i have no idea, not much experience there.
can you try running it home-manager directly from repo’s flake as i did instead?
$ nix run home-manager -- build --flake .#ashley
warning: Git tree '/home/ashley/Projects/TestHM' is dirty
warning: Git tree '/home/ashley/Projects/TestHM' is dirty
There are 30 unread and relevant news items.
Read them by running the command "home-manager news".