My dotfiles. For NixOS. As well as for Debian/Arch based distros maintained using chezmoi. I previously used to maintain them by writing custom shell scripts (in the legacy branch).
It has been some time since I last tried these out. Some things might not work as is.
Install chezmoi and run:
$ chezmoi init ritiek
$ chezmoi apply -R