Live data from Hacker News

Ask HN: What do you use to manage dotfiles?

news.ycombinator.com

71–80 of 97 posts

Re: Ask HN: What do you use to manage dotfiles?

#72
post #51

Earlier quoted context omitted.

Interesting approach! Think you can provide us with a small working example, especially the 'deploy' part?

This is what I came up with over lunch. I'm going to try keeping all my dotfiles in one org file. I have an init hook that runs org-bable-tangle to re-export all the dotfiles after saving. ** Meta If you place the following code into your emacs init when saving the ~/.dotfiles.org file the dotfiles will all be exported. #+BEGIN_SRC emacs-lisp :tangle yes (defun dotfiles-hook () "If the current buffer is '~/.dotfiles.…

Thanks. Upvoted your solution, but I see some problems with this approach for my workflow:

1. I run emacs-server, so the init file is run only during restarts OR when I manually load it from emacsclient.

2. Re-exporting all dotfiles seems rather redundant. I prefer to selectively export individual dotfiles only when I have made changes to it. That's why I was interested in the 'deploy' part.

I am not familiar enough with Babel, but it definitely seems to offer a more centralized way of managing my dotfiles. It's going into TODO.

Re: Ask HN: What do you use to manage dotfiles?

#74

GNU stow and git, per this tutorial: http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to...

I do love stow. My only hurdle (and it's not unique to stow is the chicken-and-egg of a 'setup.sh' that builds out my Mac the way I like (creating directories, installing packages etc), when my SSH keys are in stow's SSH folder.

Re: Ask HN: What do you use to manage dotfiles?

#75
I have a modular family of git repos with a 'dotfiles' one that pulls in the dependencies via bower and handles various bootstrapping and install steps. I also have one for my system config which works similarly. Vim, zsh, and tmux have their own standalone repos with one step install and updating scripts. They are written as normal plugins that load other plugins.

I want to avoid vendor lock-in to something like chef for this. The idea is that everything is either defined in a tool-agnostic config file, and bootstrapping / installing / updating the dependencies is handled by simple shell scripts. Down the road I can always swap out the tooling (bower, config_curator, archutil) without updating code in my repos since state is defined as data.

I don't like syslinks or putting ~/ under git as I don't want my working tree to affect my dotfiles until I run an "install" command.

https://github.com/rxrc

https://github.com/rxrc/dotfiles

Re: Ask HN: What do you use to manage dotfiles?

#76

I think no one has mentioned rcm[1]. I just maintain a private git repository cloned in .dotfiles in each system I own, and use rcm to set up symbolic links properly. It works pretty well with directories and lets you choose between creating and populating it with symlinks, or just symlinking the whole directory. For example, I can symlink the full .vim directory (including git submodules) and only link some files in…

I've tried the other ones, but rcm is by far the most user friendly. I maintain a public and a private repo, and link them both into rcm. It works wonderfully.

Re: Ask HN: What do you use to manage dotfiles?

#77

Earlier quoted context omitted.

Why is this a bare repo as opposed to a normal one?

Because the working tree is already your home folder, you don't need to also have a copy of these files in ".myconf/".

So why use .myconf/ at all? What is it doing?

Re: Ask HN: What do you use to manage dotfiles?

#80

I use vcsh and my, I even wrote a blog post about it: https://srijanshetty.in/technical/vcsh-mr-dotfiles-nirvana/

Thank you so much for that post! I used it extensively when I set up vcsh and my. It took a few hours to get everything working, but the flexibility is unbelievable.
Post reply on HN