Everything nix suddenly disappeared on Ubuntu

I have an ubuntu machine with nix and home-manager installed. Everything was running fine until this evening when suddenly everything nix related disappeared from my PATH:

> nix
zsh: command not found: nix

> nix-channel
zsh: command not found: nix-channel

...

:exploding_head:
I still have everything in /nix/ thankfully but I’m at a loss for what could have happened… I didn’t do anything wonky that was nix related. I didn’t upgrade any ubuntu packages, change any settings, etc.

Anyone have any idea what could have caused this? Should I just reinstall nix?

Update: I think this may be a bug that home-manager’s zsh is no longer sourcing ~/.nix-profile/etc/profile.d/nix.sh in ~/.zshrc or .zprofile by default. I still have it being sourced correctly in bash since it’s in .profile, but since home-manager manages my zsh installation – which I also use as my login shell – it may break when home-manager’s zsh config generation is faulty.

I had run nix-channel --update and home-manager switch a few hours earlier, so that checks out as well.