There are tools to manage it for you that I’m sure someone will come along and mention, but I’ve got a repo I check out at `~/.home`, then a shell script they just symlinks everything into place.
So .bashrc is a symlink to ~/.home/.bashrc, ~/.config/nvim to ~/.home/.config/nvim, etc.
It’s simple and only relies on having something sh-compatible available so portable now and in the future.
To manage per-system tweaks, I have places that include an additional file based on hostname. For example my .bashrc has something like:
if [ -f “$HOME/.bashrc.$HOSTNAME” ]; then
source “$HOME/.bashrc.$HOSTNAME”
if
Which will include a bashrc file specific to that host if it exists.
So .bashrc is a symlink to ~/.home/.bashrc, ~/.config/nvim to ~/.home/.config/nvim, etc.
It’s simple and only relies on having something sh-compatible available so portable now and in the future.
To manage per-system tweaks, I have places that include an additional file based on hostname. For example my .bashrc has something like:
Which will include a bashrc file specific to that host if it exists.Been working well for me for… a decade now?