this post was submitted on 18 Oct 2023
73 points (94.0% liked)

Linux

48389 readers
864 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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!

(page 2) 35 comments
sorted by: hot top controversial new old
[–] xengi@feddit.de 2 points 1 year ago* (last edited 1 year ago) (1 children)

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

[–] daddyjones@lemmy.world 1 points 1 year ago (2 children)

Interesting - can I ask why you prefer home-manager to stow?

[–] xengi@feddit.de 1 points 1 year ago

Can't say I'd prefer it yet. Still figuring out how nix works.

[–] Laser@feddit.de 1 points 1 year 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.

[–] Unmapped@lemmy.ml 2 points 1 year ago (1 children)

I searched so long for a good solution to this. Ended up using stow + git. I'm quite happy with it.

This video shows how it works:

https://youtu.be/90xMTKml9O0?si=zsmkoOCgyuiBOlir

load more comments (1 replies)
[–] ahal@lemmy.ca 2 points 1 year ago

I wrote my own. Though it's not just for dot files, it sets up my full environment including installing packages, running scripts, neovim plugins, cloning repos etc. Here's where it's used.

That said it isn't really documented and I only work on it if I need something myself, so I wouldn't recommend it 😂

[–] aurtzy@discuss.tchncs.de 2 points 1 year ago (1 children)

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 1 points 1 year 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.

[–] manned_meatball@lemmy.ml 2 points 1 year ago* (last edited 1 year ago)

My own intricate system of 4 git repos to manage dotfiles, bash initialization, cli tools/scripts, and system state.

The last one keeps track of installed packages and "dotfiles" out of the home directory (system config files like /etc/hosts).

[–] RenardDesMers@lemmy.ml 1 points 1 year ago

I've used homeshick https://github.com/andsens/homeshick for a few years and it's been running fine. It can load two git repos, one common public repo and one private one for work config.

[–] KHTangent@lemmy.world 1 points 1 year ago

I use a Git repo for the files, and a simple Makefile to script the correct paths and optional install steps for them

[–] Joker@discuss.tchncs.de 1 points 1 year ago

Git and stow.

Tried some different things, including a few months on NixOS. Git and stow are as easy as it gets.

[–] nyan@lemmy.cafe 1 points 1 year ago (1 children)

I just let my dotfiles fall where they may, but any version control software should be able to do what you need—they're just text files, after all. I'd probably go with mercurial, since that's what I use when I need source control for other purposes (I hate git).

[–] stepanzak@iusearchlinux.fyi 1 points 1 year ago

Why do you prefer mercurial over git?

[–] asal@lemmy.world 1 points 1 year ago
[–] ghassan@lemm.ee 1 points 1 year ago

I wrote my own: doti

I used stow for a while but realized it was lacking in some aspects, especially when trying to manage multiple dotfiles separately. For example, I wanted the dotfiles of each application to be contained in its subfolder and the flexibility to pick and choose the dotfiles of which application to place on different computers/phones.

I checked out chezmoi but thought it was overkill for my needs especially since I was a fan of how simple and straightforward my dotfiles layout was with stow was. So I decided to write my own dotfile manager, doti. It's basically a wrapper/manager for using stow. First time I share it online.

Also here are my dotfiles to give you an idea of how the layout looks. (I transitioned from using Sway with the nord theme and many tui/cli apps to using Gnome and mostly gui apps about a year ago)

[–] Andy@programming.dev 1 points 1 year ago

I still swear by yadm, which you can use just like git.

[–] lntl@lemmy.ml 1 points 1 year ago* (last edited 1 year ago)

$ crontab -e

0 1 * * * tar -cvzf ~/dotfiles-$(date +\%Y\%m\%d).tgz ~/.[^.]* >/dev/null 2>&1

[–] hemko@lemmy.dbzer0.com 0 points 1 year ago

That seems... Overkill? I just have everything I can't easily replace in nextcloud synced to a local directory. If I were to nuke my home dir or the whole machine it would take less than hour to setup it again including clean reinstall debian with gnome

load more comments
view more: ‹ prev next ›