jzelinskie
5 months ago
I've seen projects like this for years and I still have the genuinely honest question: what are people doing that managing their dotfiles is significant problem for them?
I've managed my dotfiles (12 different configuration files all compatible with cygwin, wsl, linux, macOS) for the past decade in a git repo with a 50 LOC shell script that creates symlinks for me in an intelligent way. What am I missing?
mrugge
5 months ago
You're missing the empathetic way to comment on someone's obviously unpaid, labor-of-love work. Instead the conversation is about you: your years of seeing "projects like these", your smart, minimal way of managing your config. Make a project and show it to us. Save your pathos for its documentation.
loloquwowndueo
5 months ago
I use chezmoi, and I didn’t have to write a 50-line script - just install chezmoi on a new machine, run a command pointing it to a git repo, and up pop all the dot files and configs I need to have a consistent environment everywhere.
Chezmoi also handles variations in config files for personal vs. Work machines, or even differences between machines themselves.
I agree it’s not a tremendous lift to write a bespoke solution for this (and I did so in the past) but at some point it becomes lower-effort to use something off the shelf.
msdz
5 months ago
In addition to that, chezmoi templating can be used to fill in environment variables like secret keys, you just need to unlock rbw or whatever other password manager it is that you use. I have some that I export in my shell config, and this setup allows me to have the repo in a public place and not worry about who finds it.
jitl
5 months ago
+1, I also don’t understand these tools. Especially these days, many apps are using ~/.config so i barely need a for loop to link everything. I like being able to slap my dotfiles on any box with my only dependencies being `bash` and either `git` or `curl | tar xzf`. At Berkeley I spent a lot of time sshing into various machines where I wasn’t root and I was only gonna use the system for a few hours. Like sshing in to each desktop in a computer lab looking for one nobody is running a build on.
It’s worked fine for me for 15 years, macOS, many Linux distros, FreeBSD.
eviks
5 months ago
You're missing Windows, GUI apps, and the other dozens of cli apps above 12? Also cases where symlinks break because apps delete configs before saving and the ability to differentiate between systems easier. Also the final output config is cleaner/more readable if cross-OS compatibility is offloaded to a config manager. Then templates/vars can make configs cleaner /easier to update (e.g. moved some portable apps from C to D to save ssd space, can update one var). Also can limit config diff noise by ignoring unimportant changes like latest app window position
crossroadsguy
5 months ago
So during my college days and a bit after that as well I used these tools because these tools were there to be used. I then learned it is not a problem for me, it never was. I used them for the sake of using them. So I stopped using those tools and tools like config backup etc.
I think such tools will be useful for people who use hundreds of apps and have to often migrate/reset or replicate those setups.
Kind of like you, my .dotfiles folder is a private github repo now which has barely 10 files and I don't even use symlinks anymore.
So I think it's also kind of a hobby, if I may say so.
pynappo
5 months ago
chezmoi provides a handy table for features it and other dotfile managers have. I just use a bare git repo cause it's simple but i have wanted to have easier diffs between machines and secrets management at times.
nirvdrum
5 months ago
If that works for you, great. I split files up into multiple repos and manage them with VCSH. The modular approach lets me configure multiple machines differently. I have config on my work laptop that shouldn’t end up on my personal devices, vice versa. I don’t really need my i3 config on my MacBook Pro. Ditto for XDG paths, just as I have macOS config that doesn’t have a natural fit on a Linux desktop.
I could use one repo for work and one for personal and live with the mess of useless files, but I like the cleanliness and having simple git histories. I also don’t have to have conditional statements all over the place.
juliangmp
5 months ago
I deploy my dotfiles somewhat regularly. At my day job I almost exclusively work on virtual machines, with sometimes different distros. Being able to install my usual setup (fish for the shell, helix as the editor, and a bunch of tools like eza and bat) in a few commands just saves me time.
Now to be fair, since I use rotz for this, I also install extra packages with it. So its not purely dotfiles.
ZenoArrow
5 months ago
> What am I missing?
Depends on your requirements. For example, if you have any values you want to keep secret in your config files, then using a config manager can help you to not expose them in a Git repository. Also, if you work across multiple operating systems, you can use config managers to alter your config files based on the current OS.
TheDong
5 months ago
I use home-manager for my dotfiles, and they manage quite a few things.
For example:
1. My editor config (neovim) including downloading and installing all my plugins, including the dependencies of the plugins (including deno, rust-analyzer, clippy, etc)
2. All the other tools I use, like ripgrep, python, and so on, including installing the same version on every machine I've got.
3. A bunch of misc programs and scripts I've written for myself, including all their dependencies
4. All the xdg configuration to open http links in the right browser profile, pdfs in evince, etc, as well as all the programs needed for that
5. systemd user units to run various daemons, like syncthing to sync some documents between computers, gpg-agent, etc etc.
And this works on all machines running any linux distro, from arch linux to nixos to ubuntu.
home-manager is just another dotfile manager, but since nix makes packages isolated, such that my user version of $pkg doesn't conflict or depend on the host version, home-manaer can also safely manage applications I run, like my editor, browser, developer tools, systemd units, etc etc etc.
I agree that most dotfile managers are weird overengineered projects that could have been a short shell script.
I think nix+home-manager is a weird overengineered project that could not have been a shell script.