Installing home-manager from home-manager channel


I am running nix 2.2.2 in Ubuntu 18.04 and I am trying to get home-manager installed with:

$ nix-channel --add home-manager
$ nix-channel --update
$ nix-shell '<home-manager>' -A install -I $HOME/.nix-defexpr/channels 

I get the error:

/nix/store/kpa5ygpxfnsclyhs99znwva35f41ahns-home-manager/bin/home-manager: line 86: nix-build: command not found
/nix/store/kpa5ygpxfnsclyhs99znwva35f41ahns-home-manager/bin/home-manager: line 86: nix-build: command not found
/nix/store/kpa5ygpxfnsclyhs99znwva35f41ahns-home-manager/bin/home-manager: line 99: /run/user/1000/home-manager-build.1NJcaaYm7c/ No such file or directory

When I run:
nix run nixpkgs.home-manager -c home-manager switch

Installs it, but I would prefer having it installed as described in the github page (

More context:

  • I am running fishshell and I also tried it in zsh and same error.
  • My nix-channels:
➜ nix-channel --list

What am I doing wrong? (really hope it’s not fishell)


I don’t have much insight to offer on your errors, but I can confirm that home-manager works totally fine with Fish on OSX and NixOS, so I think/hope that’s not the culprit.


Is nix-build in PATH? For example, can you run nix-build --version?

➜ echo $PATH
/home/mandla/.nix-profile/bin /home/mandla/.fzf/bin /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/local/games /home/mandla/.bin /home/mandla/.local/bin /home/mandla/.screenlayout /home/mandla/Projects/scripts /home/mandla/.nix-profile/bin


➜ nix-build --version
nix-build (Nix) 2.2.2

Running the script directly: /nix/store/kpa5ygpxfnsclyhs99znwva35f41ahns-home-manager/bin/home-manager shows the help text. I am now going through the nix-shell man page to find clues.


I hope so too, I just started using fishshell seriously like Monday and would hate that it is the culprit :slight_smile:


Quite curious. Did you find out what the issue was?


I haven’t had a change to investigate it further. I simply installed it with

nix run nixpkgs.home-manager -c home-manager switch

I’ll probably look into it if/when this breaks.