Basically I use git for .local/dotfiles/ which are then symlinked to the relevant files like .zshrc or .emacs.d/init.el. Then I just keep that repo up to date with git pulls. Works across 2 macbooks, a Fedora workstation, and a Fedora headless server.
Couple of bits from a guide I wrote recently: https://gist.github.com/aclarknexient/0ffcb98aa262c585c49d4b...
# store stuff here that you don't want in github
[[ -f $HOME/.zshenv-local ]] && source $HOME/.zshenv-local
# depends on 'brew install grep'
[[ $OSTYPE =~ ^darwin.* ]] && alias grep='ggrep --colour=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}'
That OSTYPE is great for all those little bits that are unique to each operating system. The zshenv-local is in .gitignore, so you can keep tokens, api keys, etc etc in there. OSTYPE could even be used to import specific files like .zshenv-darwin or .zshenv-linux-gnuIf you're ssh'ing between your hosts, you can use something like this:
if [[ -n $SSH_CONNECTION ]]; then
ZSH_THEME="afowler"
else
ZSH_THEME="powerlevel10k/powerlevel10k"
fi
It's not fancy and doesn't use cool tools, but my setup works for me just fine.