Live data from Hacker News

Using GNU Stow to manage your dotfiles

brandon.invergo.net

61–70 of 73 posts

Re: Using GNU Stow to manage your dotfiles

#61
post #46

Can Stow do hardlinks? The reason I ask is that IIRC systemd shits a brick if your service files are symlinks. Conversely, I have a script that does this: https://github.com/radiosilence/dotfiles/blob/master/relink All I have to do is maintain a MANIFEST file.

uAs I ubderstood, systemd only uses symlinks. Any time you enable a service, systemd executes ln -s ..systemd.. ...service ...

Yeah but the services systemd links to cannot be symlinks.

Re: Using GNU Stow to manage your dotfiles

#64
some files i symlink, some i copy, but i prefer to use the language's import/include/source/load command if the dot file is actually a program rather than a conf file. that way, i can add machine-specific configuration. to anyone who makes tools like gnu stow or those mentioned in the comments:

consider adding support to modify existing dot files as well as replace them.

Re: Using GNU Stow to manage your dotfiles

#65
post #63

I keep all my dotfiles in a directory called "~/dotfiles" and symlink just my .bashrc. everything else gets reconfigured via aliases. eg. alias vim='vim -u /home/derf/dotfiles/vim/vimrc' alias tmux='tmux -f /home/derf/dotfiles/tmux/tmux.conf' http://github.com/fredsmith/dotfiles

Isn't that a lot of work? And I doubt it will work for everything. Some programs don't give you an option to get configuration from non-standard location.

Re: Using GNU Stow to manage your dotfiles

#67

Earlier quoted context omitted.

WAT. Are you trolling us, or are you that uninformed about VCS history? Giving you the benefit of the doubt, just learn and use git[1]. Yes, there are things about the UI that suck. But the underlying machinery and power it provides is unparalleled. RCS, in short, is that horrible feet-killing pair of boots that made you think you hated , when in fact it was just frustration with sub-par equipment. [1] If you need to…

rcs doesn't have .gitignore files and accidentally running commands on your top-level repo, so I could see why one would consider it. You don't really need atomic commits for this use case, so rcs is barely worse than the alternatives.

I can't say that I've ever had a problem with accidentally running commands in my top-level repo despite many years of running it under git and other VCS'es.

That said, using tools mentioned in this thread (esp. vcsh[1] and mr[2]) it's possible to have one's cake and eat it too w.r.t. using git for homedir version control without the worries of accidentally running VCS commands on your homedir. They also allow some real benefits, like the ability to use and deploy subsets of your rcfiles. For example, you could easily create profiles like: "server-side minimal core", "main personal system", "work box with employer-specific stuff".

[1] https://github.com/RichiH/vcsh

[2] http://myrepos.branchable.com/

Re: Using GNU Stow to manage your dotfiles

#68
post #53
post #9

Earlier quoted context omitted.

I also keep my whole homedir in git, and it's great. My approach isn't to .gitignore, because I want to ignore almost everything -- I just add and commit things when I want to track them. One of my many git aliases[1] is 'git sn' for showing status without untracked files; this helps when dealing with my homedir: status --short --branch --untracked=no [1] https://github.com/cespare/dotfiles/blob/master/.gitconfig#L..…

I wondered about this, but I pose this question to you: what happens if you have a merge problem with, say, a libreoffice doc or something. How do you handle that? I use hg, but I imagine my plight would be similar. TIA.

I don't keep anything but text files in my dotfile repo, so I haven't had to deal with this.
Post reply on HN