I have been using YADM to deal with all my dotfiles, and I find it works pretty well for me. I maintain branches for each of my active machines, and though I don’t know if there’s a better method, it’s not bad.
I recently asked about keeping NixOS configs in source control in this topic. I got several good answers, including a link to michaelpj’s configs, which I adopted for my own use in the end.
roni