Gabriella439 / haskell-nix

Nix and Haskell in production
1.14k stars 116 forks source link

nix-channel list gives no output #54

Open CThuleHansen opened 6 years ago

CThuleHansen commented 6 years ago

Hi.

I am on macOS running with nix 2.0. My nix-channel --list gives not output. What can be the cause of this? Does it just use the unstable without outputting?

After manually adding the unstable pkgs, the output is correct.

Gabriella439 commented 6 years ago

@CThuleHansen: This might be because you have a multi-user Nix installation. Try the following command to see if it works:

$ sudo -i nix-channel --list

This is because the Nix daemon uses the root account's channel since it is designed to run for all users. That's why it ignores your personal channel and there might not even be a personal channel installed by default as you discovered.

CThuleHansen commented 6 years ago

I tried this, with the same result. But I have just added the unstable pkgs, so not a big issue. Perhaps worth a mention?

Gabriella439 commented 6 years ago

@CThuleHansen: What is the output of:

$ echo $NIX_PATH

I'm fine mentioning this in the tutorial, but I first want to make sure that we've diagnosed the issue correctly

CThuleHansen commented 6 years ago

/nix/var/nix/profiles/per-user/root/channels Otherwise I can remove nix and retry it all

Gabriella439 commented 6 years ago

@CThuleHansen: You might want to check out this issue: https://github.com/NixOS/nix/issues/2008

CThuleHansen commented 6 years ago

Ahh interesting. It seems like it has been fixed in an upcoming release. So maybe worth a note until then?