Some changes done through the last couple of days now result in this:
$ home-manager switch
error: file 'home-manager/home-manager/home-manager.nix' was not found in the Nix search path (add it using $NIX_PATH or -I)
error: file 'home-manager/home-manager/home-manager.nix' was not found in the Nix search path (add it using $NIX_PATH or -I)
/home/nmelzer/.nix-profile/bin/home-manager: line 115: /tmp/home-manager-build.6l2dWXK7yg/news-info.sh: No such file or directory
Neither rolling back nix-env nor home-manager does make any difference.
I did a channel update on both boxes last thursday, and realized that one box isn’t working anymore yesterday but I didn’t care much and booted into the also installed nixOS.
The other box received its channel update earlier that day (I think) and continued to work, and I did a channel update and a switch yesterday, which itself worked. Though as I wanted to change some settings today, everything broke with the error from above. I can’t simply boot into another OS with this one, as it is a remove VM provided by my employer to work in.
as the error says; there is no home-manager entry in your NIX_PATH or it is invalid.
Try ‘export NIX_PATH=home-manager=/path/to/home-manager:$NIX_PATH’ before your command or you pass the path with -I home-manager=/my/path too
$ nix eval '(<home-manager>)'
error: file 'home-manager' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:2
$ grep -A2 'for path' $(which home-manager)
for path in "" \
"${XDG_CONFIG_HOME:-$HOME/.config}/nixpkgs/home-manager" \
"$HOME/.nixpkgs/home-manager" ; do
NixOS. After some playing around, I’m now getting:
$ home-manager switch
/nix/store/gnvndplb1xl6qa59s1mpdcv3mk7q7v33-home-manager-generation
Starting home manager activation
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
error: syntax error, unexpected $end, at /nix/store/ry2b0qwvhdvdlmrrkawj9c6xiy9d6krs-env-manifest.nix:1:1
There are 24 unread and relevant news items.
Read them by running the command 'home-manager news'.
After giving this more thaught, during the weekend nixos-activation.service started to fail at my home laptop.
In the error XDG_CONFIG_HOME is mentioned, can this be related? (Sadly I won’t be able to access that computer before todays evening to get the full error message).
I faced a similar issue but in my case I was missing the following line from $HOME/.config/home-manager/home.nix:
programs.home-manager.enable = true;
So, basically what was (I think) happenning was home-manager would go set everything up and remove itself because that’s how the state was defined. In a nixOS install, that wouldn’t be an issue because it’s basically a sudo nixos-rebuild switch command for home-manager too.
Disclaimer: might be wrong because I’m new to nixOS and nix in general.