Cannot switch my home manager

When I enter home-manager switch the following errors occurs:

$home-manager switch
error: attribute 'anything' missing, at /home/milad/.nix-defexpr/channels/home-manager/modules/programs/matplotlib.nix:26:28
(use '--show-trace' to show detailed location information)

There are 158 unread and relevant news items.
Read them by running the command 'home-manager news'.

What should I do to fix this problem?

This is a common error message and means that you are wrongly mixing channels.

Please check that your HM and nixpkgs channel point to the same version.

1 Like

@NobbZ

Here is the list of my channels:

nix-channel --list
home-manager https://github.com/nix-community/home-manager/archive/master.tar.gz
nixos http://nixos.org/channels/nixpkgs-unstable
nixos-stable http://nixos.org/channels/nixos-21.05

What is the problem? both of them are unstable. Isn’t ok?

Please also check roots list of channels.

If there is a channel that is stable, then that is picked.

The name nixos for a channel is usually only used by root. A user has to use nixpkgs to avoid fallback mechanisms.

Thank you for your help.
You saved my whole day :slight_smile: