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
    21
    ·
    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
    12
    ·
    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)

    • saud@lemmy.ml
      link
      fedilink
      arrow-up
      6
      ·
      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
        5
        ·
        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).

      • chayleaf@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        11 months ago

        Here's my example (Github mirror). It stores everything from my custom packages (like GIMP 2.99, which isn't yet packaged in nixpkgs, or a custom virtiofsd to workaround an upstream bug caused by switching from the old C to the new Rust implementation), to my fish, sway, rofi, mpv configs, to my entire server setup, including Gitea, Nextcloud, Keycloak, Mumble, mailserver and Matrix server with some bots and bridges (I recently migrated from an x86_64 to a arm64 board and the only post-install setup I had to do was copy /var), to my router's nftables rules.

  • adONis@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    11 months ago

    nuking your home directory

    Imho, in that case, you should look int a more proper backup strategy to restore all your files, not just your configs.

    • daddyjones@lemmy.worldOP
      link
      fedilink
      arrow-up
      3
      ·
      11 months ago

      Thanks - yes I do have that, but I also wanted something specific to my dotfiles to make management and restoration a bit easier.

      • adONis@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        11 months ago

        I have a vorta backup, running on a regular basis for my home dir which has GBs of data.

        Mounting and restoring files is literally a matter of seconds.

        But if you want something that you can easily take with you, you can go with a symlink/git approach:

        • have a folder "configs"
        • move all your dotfiles thst have NO sensitive data like credentials into that folder
        • symlink them into their proper place
        • use GIT to track them and push them to a git repo

        Once you need them somewhere else, it's just a git pull away… easy as that.

        What I dislike about existing solutions, is they come with their own binaries, conventions, and stuff, but basically do almost the same… this is the "raw way" that will hold up on any system, and almost all of them have git.

    • qwesx@kbin.social
      link
      fedilink
      arrow-up
      2
      ·
      11 months ago

      Or at the very least partition ~ as btrfs/zfs and do regular snapshots. The downside is, of course, that a rollback won't just roll back the dotfiles. But I guess if the scenario is "nuking [the] home directory" then that's probably not an issue.

  • Syudagye@pawb.social
    link
    fedilink
    arrow-up
    4
    ·
    11 months ago

    I use git and nix (home-manager) for most of my dotfiles. The main advantage of this is that if manages dotfiles, but also you whole user environment, so you can install some software that you need for your rice for example. It's very powerfull, but it takes time to get it to work properly since you have to learn nix expressions !

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

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

  • Grass@sh.itjust.works
    link
    fedilink
    arrow-up
    4
    ·
    11 months ago

    I didn't know this was a thing. I just use a USB and my nextcloud and copy my home folder with distro and date appended to the name.

  • dino@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    3
    ·
    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.