Home-manager 22.05 gpg-agent-ssh.socket failed to produce output

I use NixOS with home-manager as my daily driver.

My pattern of usage of Nix tends to consist of brief but intense (stressful, painful) battles with Nix in trying to get it to work in some configuration that I want. Once I do get it to work, I enjoy long periods of stable and reliable usage, during which I try to avoid fiddling with Nix if at all possible, besides adding the odd package to my home.nix, or modifying some flake that I use to configure a development environment for some software project.

Earler today, I bit the bullet and typed

 sudo nix-channel --add https://nixos.org/channels/nixos-22.05 nixos
 sudo nixos-rebuild switch --upgrade
 nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.05.tar.gz home-manager
 nix-channel --update
 home-manager switch

with the final step resulting in

error: builder for '/nix/store/xk5wg96akcmz2gs0xfmvmmlfgs9zq8xa-gpg-agent-ssh.socket.drv' failed to produce output path for output 'out' at '/nix/store/xk5wg96akcmz2gs0xfmvmmlfgs9zq8xa-gpg-agent-ssh.socket.drv.chroot/nix/store/dmm7kpb22g9zhg1syk2n96g0q8sjjipa-gpg-agent-ssh.socket'
error: 1 dependencies of derivation '/nix/store/69m1i07ivbgzibdjfck077v9wzjq80xc-home-manager-files.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dri465kzqznfdvwsabhfa0m2v0qfgc2r-home-manager-generation.drv' failed to build

After a long period of not having battled with NixOS and home-manager, I am at a loss.

How should I go about understanding and fixing this problem?

This problem seems to have gone away after rebooting.

I find this puzzling. I would expect rebooting to help with run-time issues like kitty not being able to find an appropriate OpenGL [*] version on the system at the time it is launched. (And this problem was indeed solved by rebooting.)

But the error in the OP is surely a build-time error, and the whole point of Nix is to have derivations completely and hermetically determine build inputs. So rebooting should have no effect on whether a build succeeds. What am I failing to understand?

[*] OpenGL being problematic, because it depends, to some extent, on the actual hardware present on a given machine.