I’m looking for recommendations for a dotfile manager - there are so many out there I’ve got a bit of options paralysis!

I’d like a system that can backup all my dotfiles - with version management - and, if I nuked my home directory, could restore them all for me with a simple command.

Thanks in advance for you suggestions!

  • bitsplease@lemmy.ml
    link
    fedilink
    arrow-up
    13
    ·
    11 months ago

    Git and a script file that’s basically just a ton of ln - s commands

    I honestly don’t think I’ve ever found myself wanting more

  • stepanzak@iusearchlinux.fyi
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    11 months ago

    I’m extremely happy with chezmoi. It’s very simple to use, but when you need more advanced features, it has them. It can do templates, ignoring and other stuff allowing you to easily manage dotfiles on multiple machines or even multiple operating systems (like windows on PC, Linux on laptop). Here is a comparison table of some dotfiles manager (it’s on chezmoi’s website, so it may be biased) Also here are my dotfiles (as a Linux user, I cannot resist the urge to share my dotfiles whenever I have the opportunity)

  • dino@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 months ago

    chezmoi, although I am not sure I like it. Its the first I tried and some stuff seems very complicated.

    • stepanzak@iusearchlinux.fyi
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      What do you find complicated? I’m happy to help you with it. It also seemed complicated to me, but once I understood it it was pretty simple to use (unless you wanna do advanced stuff.)

      • dino@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 months ago

        The way the autocommiting works is weird, have to use regular git commands for that. Also templating doesn’t work for me. I was trying to establish a file with the same content across multiple devices in different subfolders but it kind of didn’t work out.

        • stepanzak@iusearchlinux.fyi
          link
          fedilink
          arrow-up
          1
          ·
          11 months ago

          That’s unfortunate, because I commit manually (I want to write the messages) and I never needed to template the filepaths. I’m using file templates and it works flawlessly tho.

  • XenGi@feddit.de
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    11 months ago

    Currently using stow, but in the process of switching to home manager from nix. Syncing via git.

      • Laser@feddit.de
        link
        fedilink
        arrow-up
        1
        ·
        11 months ago

        It’s nice to configure your programs similar to the rest of your system (a lot of programs have modules in home-manager), on the other hand using home-manager always feels somewhat iffy to me because some configurations require root commands to apply your user configuration changes, or you’re missing out on certain home-manager features like using global packages I think.

    • saud@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      11 months ago

      It works outside of NixOS too! Just need to have the nix package manager installed.

      • yiliu@informis.land
        link
        fedilink
        arrow-up
        4
        ·
        11 months ago

        Just so it’s clear for everybody: Nix is a programming language, build system, and package manager. NixOS is a Linux distro built with (and upon) Nix. Home Manager is a dotfile and home management tool using Nix, allowing control of dotfiles, but also per-user software, systemd services, and more. You can use Home Manager in any distro, not just NixOS (but you do need to install Nix).

  • aurtzy@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 months ago

    I use git-annex and Guix (particularly Guix Home in this case) for managing all of my data, including dotfiles. git-annex handles syncing (and backups via delivery to a Borg repo) and version management as git does, while Guix takes care of installing programs and setting up configuration files.

    I previously wrote a custom Guix service that utilized Stow as well for managing writable files, but have since replaced it with another custom Guix service that handles some cleanup processes better.

    Depending on how much you want simplicity of restoration, this approach might be on the heavier side since it’s concerned with a lot more than just dotfiles. You could replace git-annex with git to simplify the syncing part if you’re only interested in managing configuration files, though. Here’s what my Guix config looks like; the readme file shows how I would set up a system from scratch.

    • worldofgeese@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      I use Guix Home too and love it! Never been able to figure out how to get git-annex to work, especially on an Android device.

  • nothendev@sopuli.xyz
    link
    fedilink
    arrow-up
    1
    ·
    11 months ago

    home-manager. a divine tool for maniacs Nix users that lets you do declarative dotfile management