Nixpkgs: Warning: name collision in input Nix expressions, skipping

Created on 6 Jan 2019  路  2Comments  路  Source: NixOS/nixpkgs

Issue description

mudrii@nixos ~ $ nix-env -u ''
mudrii@nixos ~ $ nix-channel --update nixos
unpacking channels...
mudrii@nixos ~ $ nix-env -u '
'
warning: name collision in input Nix expressions, skipping '/home/mudrii/.nix-defexpr/channels_root/nixos'

Steps to reproduce

From normal user run
nix-channel --update nixos
nix-env -u '*'

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.
mudrii@nixos ~ $ nix-shell -p nix-info --run "nix-info -m"

  • system: "x86_64-linux"
  • host os: Linux 4.19.13, NixOS, 19.03pre165037.eebd1a92637 (Koi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.1.3
  • channels(mudrii): "nixos-19.03pre165037.eebd1a92637"
  • channels(root): "nixos-19.03pre165037.eebd1a92637"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Most helpful comment

The solution was provided by @danbst on discourse.nixos.org
Seems nixos channel was added for non-root user, and nix-env doesn鈥檛 know which nixos channel to use - root or non-root.

The fix is to remove the nixos channel from non-root user fixes the problem.

user@nixos ~ $ nix-channel --remove nixos

Note: I don't remember adding any nixos channel to non-root user.

All 2 comments

The solution was provided by @danbst on discourse.nixos.org
Seems nixos channel was added for non-root user, and nix-env doesn鈥檛 know which nixos channel to use - root or non-root.

The fix is to remove the nixos channel from non-root user fixes the problem.

user@nixos ~ $ nix-channel --remove nixos

Note: I don't remember adding any nixos channel to non-root user.

Is not exactly an issue but potential problem can be in not explicitly adding by normal user new channel why nix is showing an error.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grahamc picture grahamc  路  3Comments

teto picture teto  路  3Comments

edolstra picture edolstra  路  3Comments

tomberek picture tomberek  路  3Comments

ayyess picture ayyess  路  3Comments