The project started when while watching a keynote and the presenter mentioned that he had his entire home folder under version control. I have to admit the idea intrigued me so much that I decided to put my own home folder under version control, and like the speaker make it public. After all, sharing is caring…
After a while, I found it very difficult to keep my dotfiles project update with all the things that were happening in my home folder on multiple machines, so I started looking around. After reading this post by Leonid Mamchenkov I decided to give Ansible a try.
You are welcome to go to the project repository and have a gander.
A few things to note if you decide to run the project as is.
- It will configure your machine as I like mine.
- It will use my name and email since they are hardcoded in the repository.
- It will install applications (lots of them).
If you are comfortable running commands in a terminal proceed at your own peril.
Getting the Dependencies
First, if you don’t already have Homebrew installed on your Mac, you should by the way. You can follow the guide over at their website or just copy paste the command below into a terminal window.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
After that, you will need to install ansible, but since you now have Homebrew or brew for short, it’s just a command away.
Just paste the following command into a terminal. (I don’t know if you noticed, but we are going to use the terminal alot… )
brew install ansible
Now with ansible installed I clone my GitHub repository and run the following.
DANGER The above will overwrite your home folder.
Ansible has some cool options that allow you to skip package installations and/or network operations (Vim plugins cloning, etc) with something like the following as long as you have tagged your tasks.
ansible-playbook home.yml --skip-tags="network,packages"
You can also run only specified tags with something like:
ansible-playbook home.yml --tags="vimrc,vim-plugins"
Here is a brief overview of some of the features hidden deep in these dotfiles.
Git version control
- Color support in console git client.
- Several handy git aliases to make frequent operations faster (“st” instead of “status”, “co” instead of “checkout”, etc).
- Several handy git aliases to make long lists of parameters much shorter (“la”, “whatchanged”, etc).
Vim text editor
- The modular configuration of plugins with Pathogen plugin and git submodules.
- Collection of plugins for web developers (PHP Indent, NERDTree, Syntastic, Tagbar, Gist, etc).
- Support for 256 colours in the console.
If you need to get in touch, you can find details at the bottom of this page. Alternatively, you can comment here or at the project page on GitHub.