How to upgrade Home-Manager to 22.05

I upgraded my system from 21.11 to 22.05 but that was only possible after removing the picom configuration part. It fails with:

error: builder for '/nix/store/prxawm0mjimy4rdxxl4sbg1lh3id62cl-picom.service.drv' failed to produce output path for output 'out' at '/nix/store/prxawm0mjimy4rdxxl4sbg1lh3id62cl-picom.service.drv.chroot/nix/store/04d1jj1sz8ja3r70cpqsa850jp8w4cj1-picom.service'

According to this wiki page the problem is my Home-Manager version is older than my NixOS version:

This can happen if your NixOS version is later than your Home-Manager version (ex. NixOS 22.05 with Home-Manager 21.11). See builder failed to produce output path for output 'out' · Issue #95 · nix-community/impermanence · GitHub.

And yes, that’s true:

~/.nixos (master)> nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 5.18.12, NixOS, 22.05 (Quokka), 22.05.1928.e3583ad6e53`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.8.1`
 - channels(root): `"nixos-22.05.1928.e3583ad6e53, home-manager-21.11, nixos-unstable-22.05pre374583.cbe587c735b"`
 - channels(myusername): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

However my channels were updated before upgrading:

~/.nixos (master)> sudo nix-channel --list
home-manager https://github.com/nix-community/home-manager/archive/release-22.05.tar.gz
nixos https://nixos.org/channels/nixos-22.05
nixos-unstable https://nixos.org/channels/nixos-unstable

I don’t know what i am doing wrong. How can I upgrade the Home-Manager version, then?
Thank you in advance

1 Like

Just in case another newbie suffers the same: the solution is not only to update the list of channels but to update the channel with:

nix-channel --update  # i used sudo because those channels are global

After that nixos-rebuild switch updated home-manager.

4 Likes