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?

26 comments

  1. [2]
    niktereuto
    Link
    I don't

    I don't

    18 votes
    1. tan
      Link Parent
      Yeah same honestly, that's why I'm looking into this

      Yeah same honestly, that's why I'm looking into this

      5 votes
  2. [3]
    lucyinthesky
    Link
    I use GNU Stow to organize all of my dotfiles into a folder and track that folder with git.

    I use GNU Stow to organize all of my dotfiles into a folder and track that folder with git.

    9 votes
    1. jgb
      Link Parent
      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.

      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.

      3 votes
    2. tan
      Link Parent
      I think I'll probably use this too, standard and simple

      I think I'll probably use this too, standard and simple

      2 votes
  3. [2]
    Ganymede
    Link
    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...

    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.

    8 votes
    1. SaucedButLeaking
      Link Parent
      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

      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

      2 votes
  4. elf
    Link
    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'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?

    4 votes
  5. jgb
    Link
    I'm planning on getting everything stashed away in a git repo at some point, but right now they're carelessly strewn across ~.

    I'm planning on getting everything stashed away in a git repo at some point, but right now they're carelessly strewn across ~.

    2 votes
  6. bme
    Link
    Homeshick, mostly because good bash / autocompletion. I have never gotten stow to really work for me.

    Homeshick, mostly because good bash / autocompletion. I have never gotten stow to really work for me.

    2 votes
  7. apoctr
    Link
    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...

    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).

    2 votes
  8. richimus
    Link
    Custom shell script and github, mainly because the script also installs apps and plugins.

    Custom shell script and github, mainly because the script also installs apps and plugins.

    2 votes
  9. hook
    (edited )
    Link
    Currently what I do is: have a regular backup of my home anyway (Borg), so I can pull it from there store my most common dotfiles in Git repos and document the installation there as well, mostly...

    Currently what I do is:

    1. have a regular backup of my home anyway (Borg), so I can pull it from there
    2. store my most common dotfiles in Git repos and document the installation there as well, mostly so I don’t forget myself ;)

    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

    2 votes
  10. [4]
    zmitchell
    Link
    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: Use Ansible to specify which packages should be installed (pip, ripgrep,...

    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:

    • Use Ansible to specify which packages should be installed (pip, ripgrep, neovim, etc)
    • Keep my dotfiles in a separate repository on Github
    • Use Ansible to clone those dotfiles into place on the desktop

    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.

    2 votes
    1. [3]
      tan
      Link Parent
      Nice. How do you translate dotfile repo structure to where the files go in your system?

      Nice. How do you translate dotfile repo structure to where the files go in your system?

      2 votes
      1. [2]
        zmitchell
        Link Parent
        That's handled in my Ansible playbook. I have a dictionary that looks like this: dotfiles: zsh: path: <path to actual files> link_dir: <path to where the symlinks go> nvim: <same stuff> Then I...

        That's handled in my Ansible playbook. I have a dictionary that looks like this:

        dotfiles:
          zsh:
            path: <path to actual files>
            link_dir: <path to where the symlinks go>
          nvim:
            <same stuff>
        

        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:

        - name: create symlinks for dotfiles
          file:
            state: link
            path: "{{ dotfiles.zsh.link_dir }}/{{ item }}"
            src: "{{ dotfiles.zsh.path }}/{{ item }}"
            force: yes
          with_items: "{{ dotfiles.zsh.link_items }}"
        
        2 votes
        1. tan
          Link Parent
          Very neat! This is definitely the most comprehensive solution I've seen.

          Very neat! This is definitely the most comprehensive solution I've seen.

          1 vote
  11. unknown user
    Link
    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...

    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).

    2 votes
  12. [3]
    kalebo
    Link
    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...

    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.

    2 votes
    1. [2]
      tan
      Link Parent
      Neat, I like that it doesn't have any dependencies besides Git - though it does look a bit more involved than some other approaches.

      Neat, I like that it doesn't have any dependencies besides Git - though it does look a bit more involved than some other approaches.

      2 votes
      1. kalebo
        Link Parent
        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...

        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.

        1 vote
  13. ryjm
    Link
    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...

    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.

    2 votes
  14. itsthejoker
    Link
    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.

    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.

    2 votes
  15. Silbern
    Link
    Symlinks from a backup folder.

    Symlinks from a backup folder.

    1 vote
  16. SleepyGary
    Link
    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...

    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.

    1 vote