I'm not sure nixos would help here. Alsa has this extremely weird approach to saving state across reboots, where the state includes not only volume levels, but also sometimes something about device naming/existence of software devices. (I don't remember exactly what it stores, except that I remember that restoring old asoundrc does not actually go back to that state if the diff is of some particular shape.)
@robryk Hmm, this is good to know, thank you. I cleared the state file, it still didn’t work, but it put me on the right path.
After several dead ends and one promising but then also dead end, replacing `front:2` with `hw:2` as PCM name made it work again 🤷