[home-manager] what is the `~/result` directory?

What is this ~/result cruft directory that home-manager put into my home folder? It appears to be a symlink to some home-manager/nix stuff:

❯ ls -al result
lrwxrwxrwx 1 skainswo skainswo 67 Aug  2 12:35 result -> /nix/store/9dvjk10y7zfmhqw1nl6266qxs0gzq79x-home-manager-generation

I just unlinked it, and that seems to have been a mistake since now home-manager isn’t happy with me:

❯ home-manager
zsh: command not found: home-manager

So what is ~/results doing there? And is it possible to un-brick my install?

1 Like

result will be created when you did a home-manager build and it will be created in the folder where you ran that command.

Usually it shouldn’t matter if you remove it or not.

Depending on how you used to use and installed home-manager there are different ways to fix the installation.

If you used the standalone installation from the HM docs, then redoing the steps should work.

If you followed some other steps, you need to tell more about how you originally installed the HM.

Thanks so much! I think in fact my entire Nix setup may have been borked when upgrading Ubuntu from 18.04 to 20.04…

Has anyone else run into this before? Is there a fix?

There is neither a 18.04, nor a 20.04 release of nixOS. So you probably run nixpkgs on some other distribution?

The update process might have reverted changes made by the nixpkgs installer which make your “profile” and channels and other nix related stuff available at all.

As a former Arch Linux user I’m not used to the concept of release upgrades that much. NixOS is the first non-rolling distribution I use in 5 years.

Ah, yes to clarify it was an Ubuntu upgrade from 18.04 to 20.04. I have no idea why, but that seems to have broken my nix installation.

I think it will be necessary to completely remove nix and reinstall it.

There are some stray files you have to remove manually, but I don’t remember which and where.

I only remember that there were this files making reinstalling nix on a Mac impossible until removed about a month ago in the discord chat.