Live data from Hacker News

Dotfiles.github.com - A guide to dotfiles on GitHub

dotfiles.github.com

21–30 of 39 posts

Re: Dotfiles.github.com - A guide to dotfiles on GitHub

#21

While we're on the subject - has anyone found a good way to separate environments while keeping your setup fairly DRY? e.g. I have slight variations in my aliases for work/home, different git config email etc. You can find mine here: http://github.com/adamgibbins/dotfiles

You should take a look at http://vcs-home.branchable.com/ They have a mailing list and a bunch of resources to do similar things.

Right now I use movein[1] to maintain my dot files. Each dotfile is held in it's own repo which is checked out to $HOME via GIT_DIR and GIT_WORK_TREE environment variables. The mr[2] command ties the git repos together as it if was one repo. I use additional repos or branches to handle variations within dotfiles. For work, I try to keep things confined to the relevent directory eg. using local.vimrc[3]

[1] http://stew.vireo.org/movein [2] http://kitenet.net/~joey/code/mr/ [3] https://github.com/embear/vim-localvimrc

Re: Dotfiles.github.com - A guide to dotfiles on GitHub

#22

While we're on the subject - has anyone found a good way to separate environments while keeping your setup fairly DRY? e.g. I have slight variations in my aliases for work/home, different git config email etc. You can find mine here: http://github.com/adamgibbins/dotfiles

I haven't done this yet, but I'm guessing you could just branch off of master, and create a "home" or "work" branch.

To me that might be better than using setup scripts for the various environments, and keeping it all in one branch (like I've seen other people do).

I'd prefer to see the differences by doing things like:

    git diff master work
or

    git diff home work
etc

Re: Dotfiles.github.com - A guide to dotfiles on GitHub

#24

While we're on the subject - has anyone found a good way to separate environments while keeping your setup fairly DRY? e.g. I have slight variations in my aliases for work/home, different git config email etc. You can find mine here: http://github.com/adamgibbins/dotfiles

I have a "~/.hostclass" file on all systems, created manually, which contains some string identifying which confiv variant to use on that machine. EG, "home", "work".

Then, my config files are "make"'d by concatting three files: cat "$1.first" "$1.`cat ~/.hostclass`" "$1.end" > ~/.$1

This lets me split out specific parts into a hostclass-specific file.

Generally, I set variables in these files that gets used in the $1.end file.

It works pretty well for me, since my hosts are generally pretty close to each other.

Re: Dotfiles.github.com - A guide to dotfiles on GitHub

#28

(Obvious) disclaimer: this is a user-hosted subdomain on GitHub. It is not an official GitHub page (even if the logo is two octocats snuggling together).

Which means, of course, it's also a repository if anyone is interested:

https://github.com/dotfiles/dotfiles.github.com/

Re: Dotfiles.github.com - A guide to dotfiles on GitHub

#29
I use something relatively similar, but I do it with Chef.

(shameless plug) Kindness: A nice way to bootstrap your box (with chef) http://joshtoft.com/kindness/

It takes advantage of site-cookbooks with Chef, letting you bring in your own site-cookbooks and also takes your chef-solo.json (if it exists).

I made it to get away from the rake dotfile sillyness.

Re: Dotfiles.github.com - A guide to dotfiles on GitHub

#30

While we're on the subject - has anyone found a good way to separate environments while keeping your setup fairly DRY? e.g. I have slight variations in my aliases for work/home, different git config email etc. You can find mine here: http://github.com/adamgibbins/dotfiles

I found vcsh to be very effective. Files live directly in $HOME but the .git repository is in a special directory.

https://github.com/RichiH/vcsh

Post reply on HN