Spurious errors while rebuilding

As of lately, I’m getting the following errors while nixos-rebuild switching:

error: cannot connect to daemon at '/nix/var/nix/daemon-socket/socket': Connection refused
Activation script snippet 'nix' failed (1)

What does it mean?