I use a `.dotfiles` github repository with a `setup` or `setup.cmd`, depending if its windows or *nix and which host. Additionally, I keep my config files in `.dotfiles/etc` and the setup scripts softlink the files to the right locations in $HOME. Examples:
- .dotfiles/etc/git/.gitconfig
- .dotfiles/windows/setup.cmd
- .dotfiles/linux/setup_ubuntu
- .dotfiles/macos/setup
The setup script depends on the OS, using `scoop` for windows (https://pilabor.com/blog/2021/12/automate-windows-app-setup-...), `apt` / `dnf` / `pacman` for linux and `brew` for macOS.