I develop in an Ubuntu Multipass VM on my M1 MacBook Air. It's great -- I get all the GUI/ecosystem niceties of macOS, but work in "real" Linux. I mount my Mac home folder on the Ubuntu VM, so in a way this is kind of like "WSL for macOS" -- I sometimes even forget that I'm not actually on my Mac, it's so seamless.
For a while I was using Parallels and/or UTM, but honestly (perhaps due to my /r/unixporn addiction), not having the option of a GUI on the Linux VM is great (well, it's technically possible with Multipass, but it's a bit involved). For work, I prefer to treat Linux as command line-only, nothing more -- "OS as IDE," that whole thing.
Since it's a VM, I'm happy to just blow it away and start over if I screw something up (though, the lack of a DE greatly simplifies and reduces the number of things that can go wrong). I have a single repo with all my dotfiles, and if I pull that down and symlink a few things, I have my old environment up and running in minutes. I've been meaning to look into nix, but haven't yet since it's known to have such a steep learning curve. For now, though, this is working great; my needs are so simple and my tools so few that I honestly don't know if the juice will be worth the squeeze.
I also tend to keep my Mac pretty clean and "unpolluted," as I generally create bespoke build environments in VMs. So even the Mac is fungible.
I've honestly never been happier with a dev machine/environment. No more weird macOS/Linux inconsistencies, hardly any maintenance overhead, aside from customizing my dotfiles (which I really enjoy -- it's like gardening, in a way). It all just works.