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? https://nix-community.github.io/home-manager/index.html#sec-flakes-standalone
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.

Hello, did anyone find an explanation to this issue?

I just had it pop up after an update today, home-manager switch --flake . ended with:

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)

Same scenario as @noblman, I am using home-manager within NixOS but configured independently from the system configuration.

Strange thing is that issuing again home-manager switch --flake . succeeds and displays:

There is 1 unread and relevant news item.
Read it by running the command "home-manager news".

Does anyone know of a solution to this?

My system works, packages get updated, my config get applied, but I always get these errors. Do I have something configured wrong?

I created a PR that fixes this here: home-manager: fix missing string context by Kareem-Medhat · Pull Request #5205 · nix-community/home-manager · GitHub.
Waiting for merge. In the meantime you can use this repo with the fix: GitHub - Kareem-Medhat/home-manager: Manage a user environment using Nix [maintainer=@rycee]

1 Like