Nix 2: cannot install vscode, but no error message — WTF?

I just upgraded Nix from pre-2 to 2.1; I now tried to install “Visual Studio Code”, but nothing seems to happen — no error message, but no actions either — what can be the reason? How can I try to debug it further? The commands I’m trying:

$ nix-env -iA nixpkgs.vscode
$ nix-env -q | grep vscode
$ nix-env --version
nix-env (Nix) 2.1.1
$ nix-channel --list
$ nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'

Ehhh, ok, found it myself soon afterwards:

  1. I added a -v flag to nix-env -iA nixpkgs.vscode. This resulted in a list of source file names being shown; one of them was .../licenses.nix. This reminded me that I’ve seen some allowUnfree flag in the past, so I thought that might be the culprit.
  2. I added allowUnfree = true; to my ~/.nixpkgs/config.nix, and lo and behold, nix-env -iA nixpkgs.vscode worked now.

It would be really helpful if nix-env -iA showed some message mentioning what’s going on in this case :confused:


Looks like ?