mkdir Projects & cd Projects git clone https://github.com/gonsie/dotfiles.git cd dotfiles ./synch.sh
Return later and change the remote to use ssh protocol.
All the magic of this setup is in the synch.sh
script.
This script will install the dotfiles the first time through.
Subsequent runs will perform a diff between the installed files and the repo copy of the files.
- Clone this repo into a projects directory (I use
~/Projects
). - Run
synch.sh
. If$install_dir
does not exist, the script will create it and install all of the dot files, essentially mirroring this repo. Any items listed in a$link_file
file are sym-linked to~
. - Any machine-specific configurations (or private information) should be stored in a
.extra
file outside of this repo or the$install_dir
hierarchy. Be sure to source the extra files from appropriate place. - Make changes to the locally installed configuration files (stored in
$install_dir
). To synchronize changes back to the repo, rerun thesynch.sh
script. The script will present diffs between the local install and the cloud (repo) versions of the files. It will not make any commits, just move changed files into place.
These settings can be changed at the top of the synch.sh
script:
install_dir=~/.config
link_file=links
My emacs configuration uses a hierarchy of files, as described in this blog post.
source ~/.config/bash/bashmarks.sh
# local homebrew settings set -x PATH /Users/elsa/homebrew/bin $PATH
:
# if vf is installed eval (python3 -m virtualfish)
:
# local git settings GIT_AUTHOR_NAME="Elsa" GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" git config --global user.name "$GIT_AUTHOR_NAME" GIT_AUTHOR_EMAIL="elsa@example.com" GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" git config --global user.email "$GIT_AUTHOR_EMAIL"
(setq shell-command-switch "-C") (setq ispell-program-name "/opt/homebrew/bin/aspell") (setq ispell-list-command "--list") (add-hook 'eshell-mode-hook (lambda () (eshell/addpath "/opt/homebrew/bin"))) (setq shell-file-name "/opt/homebrew/bin/fish")
There are two kinds of new machines:
- Brand-new front end systems
- SSH-accessable servers
New front end systems require additional applicaitons and manual preference configuration. See the ~NewSystem.md~ file for more details.
See =synch.sh=
There are a ton of great dotfiles repos out there, but here were the ones I found that originally inspired this repo.