Home-manager broken after nix-channel --update run

Hello,
I’ve recently ran nix-channel --update and ended up with broken home-manager. I’m very new to nix and not sure where to look to troubleshoot the following error.

❯ home-manager switch
error: 'submoduleWith' at /nix/store/s8j80dqc1g19xqbdm5xs8473iw1jnmyc-nixpkgs/nixpkgs/lib/types.nix:570:7 called with unexpected argument 'description'

       at /Users/val123/.nix-defexpr/channels/home-manager/nixos/common.nix:14:14:

           13|
           14|   hmModule = types.submoduleWith {
             |              ^
           15|     description = "Home Manager module";

This error is common for a channel mismatch between home-manager and nixpkgs.

Please make sure that you use a correct pair.

do nixpkgs and home-manager channels need to match?

❯ nix-channel --list
darwin https://github.com/LnL7/nix-darwin/archive/master.tar.gz
home-manager https://github.com/nix-community/home-manager/archive/master.tar.gz
nixpkgs-unstable https://nixos.org/channels/nixpkgs-unstable

What are roots channels?

You don’t have a nixpkgs, so roots nixpkgs or nixos become relevant.

root# nix-channel --list
nixpkgs https://nixos.org/channels/nixpkgs-unstable

Did you also update that one?

That was it, thank you!

I would recommend to also create a nixpkgs channel in your user channels. This makes things a lot easier.

@Sandro I don’t understand how channels relate do each other between different users. Would I need to keep the root user’s channel around? Or as long as nixpkgs channel is defined for my user the root’s channel won’t be looked up?

If you are trying to use a channel which does not exist under the user nix looks at the root user channels. If the channel exists there then that one will be used.

Yes, I think it is used by nix update-nix.

yes

Hosted by Flying Circus.