Skip to content

ambirdsall/dots

Repository files navigation

dotfiles

These are my linux configuration files. They’re tracked in a git repository separate from the working tree, which is just my home directory; this replaces an ongoing symlink song and dance for a little upfront setup effort. Given that the upfront work can be copy-pasted, it’s a pretty great tradeoff.

to install on a new computer

To get up and running:

  1. clone the dotfiles repo
  2. copy the files over to their proper locations, and
  3. configure the dotfile git repo to ignore all untracked files

The last step is so neither I nor you ever accidentally push our whole home directory to github, lol. So:

git clone --separate-git-dir=$HOME/.dots git@github.com:ambirdsall/dots.git tmpdotfiles
rsync --recursive \
      --verbose \
      --exclude '.git' \
      --backup --suffix=.dots.orig \
      tmpdotfiles/ $HOME/
rm -r tmpdotfiles

git --git-dir=$HOME/.dots/ --work-tree=$HOME config --local status.showUntrackedFiles no

If you’ve already installed emacs, you can now run

make install

followed by whichever of the following is appropriate

make linux
make macos

managing this git directory

The ~/bin/dots file provides a dots command to handle all interaction with the git repo. It wraps git, passing the correct directories to --git-dir and --work-tree and paving a few common paths: it defaults to git status -s when called with no arguments, and dots c some commit message expands to ~dots commit -m “some commit message”~.

todo list

  • [ ] find way to invoke magit-status with a separate git dir and work tree I think there’s an emacs package that sets up a yadm / magit integration (via TRAMP, I think?); since, IIUC, yadm is more or less a thin wrapper over a bare git repo, this same approach ought to be usable here.