Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I port over a ".dotfiles" repo? #91

Open
davedash opened this issue Aug 3, 2014 · 1 comment
Open

How do I port over a ".dotfiles" repo? #91

davedash opened this issue Aug 3, 2014 · 1 comment

Comments

@davedash
Copy link

davedash commented Aug 3, 2014

I use .zsh and have a fairly custom .dotfiles repo... how would I even begin to add this?

I'm new to chef, so my first instinct as a step 1 is to just write a recipe that exec's git to pull it down and exec the init script - but is there a better way?

Also how do I get ktichenplan to run custom recipes?

@roderik
Copy link
Member

roderik commented Aug 3, 2014

I can see the value of this kind of dot file system over the included bashrc system for the dotfiles cookbook.

I would create a recipe very similar to https://github.com/kitchenplan/chef-dotfiles/blob/master/recipes/projects.rb

I would put the target location, got source and install command in an attribute. Since the repo can be a lot of things, maybe even an array of this list, like the projects recipe.

Additionally, I can see that you sometimes want these settings for more than your current user (root for example), so also add a loop for "dotfile users" like we do for vim https://github.com/kitchenplan/chef-dotfiles/blob/master/recipes/vim.rb

You can do this by forking the dotfiles chef cookbook repo, adding the recipe and changing the source in the /opt/kitchenplan/Cheffile to your fork. Also remove the version constraint to get "master".

After testing, send a pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants