23
votes
How do you manage your dotfiles?
This area is so much more complex than I first expected, with options like your basic manual cp or symlinks, stow, yadm, homeshick, or hacking together some bash yourself. What do you use?
I don't
Yeah same honestly, that's why I'm looking into this
I use GNU Stow to organize all of my dotfiles into a folder and track that folder with git.
Having read this thread, I took a little time to put my key dotfiles into a
fossil
repository and use stow to handle the symlinking, and it has worked nicely. Thanks for the tip.I think I'll probably use this too, standard and simple
I'm pretty basic.
~/.dotfiles
directory which is a git repo for version tracking and sync between machines. Copious sourcing and symlinking depending on the config does me fine.I've toyed with some fancier solutions but in the end it's always way more than I need and I'm happy doing things by hand.
That's pretty slick, actually.
We have an nfs share for home directories at the office, so my dotfiles just come along for the ride
I've been using Linux for like ten years and the concept of actually managing those files has honestly never occurred to me.
I guess I just like relearning how .vimrc's work every year or two?
I'm planning on getting everything stashed away in a git repo at some point, but right now they're carelessly strewn across ~.
I use mackup.
Homeshick, mostly because good bash / autocompletion. I have never gotten stow to really work for me.
I have my system and user configs in a git repo. Usually I clone the repo to
~/clones/dots
, then symlink them accordingly (e.g.~/clones/dots/skel/.zshrc -> ~/.zshrc
,~/clones/dots/etc/doas.conf -> /etc/doas.conf
).Custom shell script and github, mainly because the script also installs apps and plugins.
Currently what I do is:
That being said, I am watching this topic with interest to perhaps find a better system.
Addendum 2018-06-05:
I will most likely switch to GNU Stow as well. Thanks for the suggestion
I just got a desktop at home (my main computer is a laptop), so I'm just starting to use Ansible. Here's how I'm doing it:
pip
,ripgrep
,neovim
, etc)Any time I run the Ansible playbook, the latest versions of all of my packages are installed, and the latest commits to the dotfiles repo are pulled. I'm basically done at this point, but I want to make sure it's all working perfectly before I switch my laptop over to that set of dotfiles.
Nice. How do you translate dotfile repo structure to where the files go in your system?
That's handled in my Ansible playbook. I have a dictionary that looks like this:
Then I just say something like this in the playbook, where
link_items
is the list of items that I actually want to create symlinks for:Very neat! This is definitely the most comprehensive solution I've seen.
All in a git repo via yadm, synced to GitHub. It's pretty good, apart from importing to a new machine is a bit painful (yadm does a weird thing of stashing conflicting files, but it stashes them the wrong way around or something).
After using a few different dotfile managers I finally settled on using a simple git repo. This setup is inspired by a comment by StreakyCobra on HN where he uses a bare git repo whose work tree overlays the home directory and a couple bash aliases. There's no custom software or scripts to install and when the configuration files diverge between machines I simply make a branch for that machine. It works pretty slick.
Nicola Paolucci did a nice write up on the method and put it here if you want to know more.
Neat, I like that it doesn't have any dependencies besides Git - though it does look a bit more involved than some other approaches.
Yeah, the initial setup is more involved and if you don't have the aliases setup it's a little more awkward to use, but for me it's less complexity than needing to grok any additional magic done by a dotfile manager. It's just git doing what it's best at.
I've been using NixOS (https://nixos.org/), basing my config on https://github.com/tazjin/nixos-config - I've been versioning my dotfiles for years now, but this adds an extra layer of dependability. It's nice to know I can confidently reproduce my entire system whenever/wherever I want.
I use yadm and I've been pretty pleased with it so far. I like that I can be very explicit with what goes where.
Symlinks from a backup folder.
I have all my dotfiles in
~/.files
, I use DotBot to setup all the symlinks and this is all stored in a private repo on bitbutcket. It also contains a simple bash script to install all my dependencies and apt repositories. I can get setup on a new computer in about 5 minutes +/- 5 minutes for connection speed.