Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

My personal dotfiles featuring easily-updatable dependencies (oh-my-zsh, vim plugins).

branch: master
Octocat-spinner-32 git Add template hooks for vim ctags. September 24, 2012
Octocat-spinner-32 support Update oh-my-zsh and some vim bundles December 18, 2013
Octocat-spinner-32 takeup Remove redis.conf December 18, 2013
Octocat-spinner-32 vim Update oh-my-zsh and some vim bundles December 18, 2013
Octocat-spinner-32 zsh Switch to rbenv December 18, 2013
Octocat-spinner-32 .gitignore Ignore some more local config files. September 24, 2012
Octocat-spinner-32 .gitmodules Add command-t to vim instead of ctrlp January 12, 2013
Octocat-spinner-32 README.md Add MIT license. November 20, 2011
Octocat-spinner-32 Rakefile Add command-t to vim instead of ctrlp January 12, 2013
Octocat-spinner-32 ackrc Create separate ack type for just rails views. September 15, 2011
Octocat-spinner-32 gemrc Add --no-ri back to gemrc December 18, 2013
Octocat-spinner-32 gitconfig.erb Set osxkeychain for gitconfig December 18, 2013
Octocat-spinner-32 gitignore.erb Add a bunch of vim-related stuff. September 24, 2012
Octocat-spinner-32 irbrc.erb Fully integrate Pry (rails 2, 3, and non-rails) February 11, 2012
Octocat-spinner-32 nzbget.erb Add nzbget config. September 24, 2012
Octocat-spinner-32 pryrc.erb Fully integrate Pry (rails 2, 3, and non-rails) February 11, 2012
Octocat-spinner-32 railsrc Disable newrelic in rails console. September 24, 2012
Octocat-spinner-32 rdebugrc Add rdebugrc. Close #7. September 15, 2011
Octocat-spinner-32 rvmrc Add rvmrc config. September 29, 2011
Octocat-spinner-32 ssh_config.erb Make more things in ssh config optional December 11, 2012
Octocat-spinner-32 tm_properties Add an initial .tm_properties file for TextMate2. January 20, 2012
Octocat-spinner-32 todo.erb Only compile erb files, but do it at any depth. Also better organizat… September 15, 2011
Octocat-spinner-32 vimrc Update vimrc December 18, 2013
Octocat-spinner-32 zshrc.erb Switch to rbenv December 18, 2013
README.md

Self-generating dotfiles

Goals

  • Depend easily on other packages (single-command update)
  • Keep everything under version control
  • Have idempotent yet flexible script that sets everything up

I want to be able to easily depend on other packages for my dotfiles, such as oh-my-zsh, or janus. When I say "easily depend" I mean being able to run a single command to get the latest package updates without having to redo my customizations. That's the main goal. The second goal is to keep everything under public version control (meaning, private stuff is consolidated and easily gitignored). The third goal is to have a consistent and idempotent, yet flexible bootstrap script. I decided to go the rake route, since I'm a rubyist, and rake is packaged with ruby by default, thus available on every mac.

Design

The default rake task runs the following chain.

[ :download, :build, :install ]

The main idea here is that the files and directories in the root of git repo are not the ones being used, they are only the source files. You can modify them and run rake to update your actual dotfiles, which reside in build dir. This separation enables a couple of important possibilities.

  • it's possible to run erb on config files
  • it's possible to patch dependencies while preserving the clean state for updates

Essentially, the rake task creates build directory, initializes submodules (oh-my-zsh, etc), copies everything to build dir, parses every foo.erb replacing it with foo, performs any custom post_build tasks, then symlinks the specified files and directories to your home dir.

The custom post_build tasks include things like symlinking the custom zsh directory into oh-my-zsh, and adding my theme to oh-my-zsh, because they don't have a customization hook for that.

Install

cd ~
git clone git://github.com/maxim/dotfiles.git Dotfiles
cd Dotfiles
rake

OS X Customizations

cd ~/Dotfiles
rake osx

Make changes

cd ~/Dotfiles
# make changes
rake

Update dependencies

cd ~/Dotfiles
rake update

Remove everything generated

Removes symlinks too, be careful

cd ~/Dotfiles
rake cleanup

License

Copyright (c) 2011 Maxim Chernyak

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.