I was kind of surprised to see this article on HackerNews, so I thought I’d ask here; how do you handle your dotfiles and do you share them publicly?
My own dotfiles started from those provided by ArcoLinux, with a bunch of changes over the years I had them. Currently installed using Ansible, because that’s more sensible than Bash for this imo.
I have embarrassing code and commented lines in mine, so not sharing. (using Awesome and qtile)
If someone has a problem my dots have the solution for, then I might copy paste edited segments.
I share my dotfiles, I don’t see anything intimate or personal in there. I share them because other Linux enthusiasts have asked about what to use or how I config it.
It’s in my GitHub but what I don’t do is share my GitHub publicly, mostly cause it links me from my shit posting social media where I’m too open about things, into the work and irl landscape.
I like to keep those things separate.
Share me your .ssh files please
hmm I don’t consider that part of like config stuff although I get it’s a dotfile
In fact send me your ./…/…/ please
I share my CONFIG.SYS and AUTOEXEC.BAT files
I use nixos (with Home-Manager), so I have everything in a declarative configuration. I have all of that in a public repo (well not quite all, I have my email setup in a private repo that’s included in the configuration).
Do you write your own modules for programs that don’t have a home-manager module yet?
That was my biggest issue when I tried nixOS, that for a lot of configs I’d have needed to create my own wrapper.I’ve done that for one or two modules, but if that’s too much, I just do the hackjob solution: have the actual dot files in the repo and include them in the config, so nixos copies then to the store read-only and links them to my home. But I’ve had that come up pretty rarely, tbh. I don’t know if Home-Manager has become more comprehensive or if I’m just not that demanding, but I’ve only had a handful of modules where I needed to do significant tinkering
The vast majority of dotfiles can be split into multiple documents. If you want to share but also put sensitive/personal information in some of them, just part the personal bits out into separate documents and maybe give them all an easy to filter suffix/prefix. Then just only publicly share the other files.
All public and I regularly link people to my bash functions. Started with git bare repos, moved to stow, now on chezmoi. If I need anything more complex than chezmoi for these I’ll probably give up syncing them altogether.
What do you like about chezmoi vs stow?
Honestly, I was running into the limits of stow. Want to unstow some configs on a bare machine? I hope you wanted that entire directory to be a symlink. Then I saw that someone had actually fixed that many years ago but the maintainer at the time was caught up in some personal crypto related projects and did not appear to be looking at the mailing list.
Chezmoi fixed that, applied a templating engine and added a data mechanism. In moving my stow configs I realized that application specific config file deployments are nice but shouldn’t be necessary. Templates fill that gap, and meshing them with scripts allows you to do some cool things only when variables change.
Plus I was beginning to play around with go at the time, so it just seemed like a good idea to use something I could contribute to if I needed.
I still don’t think I’m using chezmoi to it’s full potential, but I am fairly proud of the script I use to determine data sources for my waybar config on all of my machines.
Started with git bare repos, moved to stow, now on chezmoi
started exactly the same, now using YADM and loving its simplicity.
I use YADM to manage my dotfiles. I like and recommend it.
I don’t share them, though.
I work in a security-related position. My dotfiles expose more about tools I use, how I have them configured and if those configurations are secure.
I still like sharing and if there’s some snippet I think is particularly useful, I may share directly or post it somewhere. But I don’t share them all by default.
Pretty much how I feel about it too. It’s not like I invented anything here, I mostly copied it from others or the docs. I will share snippets with people if it helps them but I’m not publishing everything either. Might need to look into yadm at some point.
YADM is essentially git so about the only thing you need to remember is to use
yadm
instead of git when managing your dotfiles.
What originally started as a git repo for storing backup scripts and a list of GNOME Shell extensions morphed now contains dot files, systemd units, Pipewire and Wireplumber configs, scripts for installing new software from Brew and Flatpak, and a systemd service that pulls and apply the latest changes on session startup.
Bare git repo + some custom aliases and functions to sync some things across machines.
But I agree it’s a bit too personal and I don’t share most things.
One of the cool things about linux is you can have a 1 of a kind desktop. I dont share my dotfiles because they look like shit and because i like knowing my desktop is uniquely scuffed.
I use stow and a local git server to keep and clone to all my machines
If 50 lines of text are too personal, then you either need to pick different tools or create *_local files that you don’t share.
Currently installed using Ansible, because that’s more sensible than Bash for this imo.
What do you mean? It’s just a few lines to symlink everything for me.
I don’t use symlinks, I copy the files to their place. This also means I have to manually copy updates back into my repo, but it massively reduces the risk of committing a private key or a bunch of bad changes to my repo.
My switch to Ansible from bash was mainly motivated to make the initial setup more robust. My setup script would need fixes every time I installed a new machine and be semi-unattended at best. I find it also easier to make changes and add new steps
For reference, here are the bash scripts I used before:
config script
setup script
I don’t share mine. I manage them with gnu stow and my private gitforge on my server (with 3-2-1 backup in place)
I don’t have an objection to sharing them. I don’t think it’s too personal, I just don’t use a public facing gitforge.
Edit to add: I have branches for my different machines in my dotfiles repo for variations
Can you use Ansible for free?
yes, it’s just a python package. there are management services for enterprise users that have associated costs, though. it used to be called ansible tower but i’m unsure what the name is now.
Ansible Automation Platform.
Thanks!