I’ve been reading up on the concept of dotfile management, and I’ve come across tools such as GNU Stow, chezmoi, and yadm, but before I select a tool, I’d like to understand the workflow a little better.
I understand if the dotfiles are in some cloud provider such as GitHub, then after a fresh install one can do git clone etc, but let’s say one’s dotfiles are not stored in the cloud, then what’s the workflow for getting those dotfiles onto the freshly installed OS? Do people do git clone from another machine on their local network, manually copy the dotfiles folder from the source, use an app like LocalSend, or something else?
EDIT: Clarifying that this is for a home environment, where I have two or three different laptops in service at any given time. One is my main daily driver and doesn’t change much. The other two are kinda my sandboxes and I’m often distro hopping on them. This question is mostly for distro hopping on my sandboxes, which is like once or twice a month. Thanks!
So, I have been wondering how distro hoppers handle setting up the system after an install… Going by this thread, it sounds like it is just a matter of stashing the config files somewhere else and then restoring them afterwards?
What about applications? I assume those need to be reinstalled and configs restored as well, or is it all manual after getting the OS set up?
One last question, does anyone have a link to an article explaining the process?
you can go crazier and use ansible or even just switch to NixOS if you want to have your entire system defined in configuration files. I use NixOS.
NixOS is great. I love just how extensively you can configure a system by simply dropping in a config file. If I have to set up a new system, I usually work it out in a VM, then just copy the config files onto the system’s fresh NixOS install and have it almost entirely set up in minutes.
As a former distro hopper: i just partitioned my drives with /, /home and /opt and only replaced the root partition - yes I had a lot of config files that weren’t needed, but one could use scripts to help with that.
Then some scripts to reinstall the programs need and resetup /opt and i was ready to go. For my pis am doing it with ansible.
Easy enough to put a repo on a usb drive if that’s what you want, or indeed if you build the folder structure you can just copy. Fine for the occasional install, if you’re doing it wholesale, Ansible.
This is for the occasional install in a home environment on some extra laptops I have around the house. I updated the OP to clarify my use case. Thanks!
let’s say one’s dotfiles are not stored in the cloud, then what’s the workflow for getting those dotfiles onto the freshly installed OS
You’re just asking how to copy files from one computer to another. There is nothing specific to dotfiles here at all, right? So just do whatever you’d normally do for copying files?
True, although it’s not unusual for me to think I know all my options, and then discover new ideas by reading how other people do it. (I mean in general, not specific to copying files from one machine to another)
If you have a network share available, it can be a git remote.
cd NETWORKSHARE mkdir dotfiles.git cd dotfiles.git git init --barecd $HOME/dotfiles git remote add origin NETWORKSHARE/dotfiles.gitThen do
git pushandgit pulloperations as usual. The files at NETWORKSHARE/dotfiles.git will not be readable, but will have the full history of changes.You could also just use a USB drive or even a CDRW drive 🤓 Imagine a CD with dotfiles sharpied onto it like its 2001
Good point!
I have done this with a USB key. It worked fine.
You could self-host a shared “source of truth” git repo that you access over ssh or filesystem. That can be anything from a USB thumb drive, a small clean server or a container on your existing desktop with ssh access, to an entire Forgejo deployment. Then you only need the “secret zero” of an ssh key to get everything set up and syncable.
If fresh setup is more common, you probably have other parts like package installation and network configuration that you also want to automate. Enter configuration management like ansible or salt, image builders like packer or archiso, “immutable” solutions like Nix or rpm-ostree. Once you get there you typically manage that in git anyway and you could put your dotfiles repo as a submodule and copy them over as part of OS setup.
If it’s just for once in a blue moon, manual ad-hoc copying gets you pretty far.
No matter how you slice it I think you have to either frequently spend time syncing changes or just accept the drift and divergence between machines and the sources.
Ansible playbook.
I use chezmoi which syncs via my private Gitea instance. I can’t imagine not using a VCS for dotfiles, the number of times I’ve edited my ZSH aliases file or my VSCodium settings.json on both my desktop and my laptop and then had to merge the changes together is… a lot. A new setup is as simple as installing chezmoi, logging in to Bitwarden, downloading my Gitea SSH key, and cloning. The templates handle customizing things to the platform I’m on. I can do it over HTTPS using any backend the Git credential store supports too.
A new setup is as simple as installing chezmoi, logging in to Bitwarden, downloading my Gitea SSH key, and cloning.
Thanks for sharing your workflow. I might be getting into the weeds a little bit, but for a new setup do you install your apps first and then clone your dotfiles or vice versa?
It doesn’t usually matter, though you could have a script in your dotfiles to bootstrap the installation of everything needed. I haven’t bothered because I very rarely set up new machines, but for a VM warrior that’s what I would recommend for sure. You can use chezmoi templates to automatically use
apt/dnf/yum/zypper/brew/whatever and export different envs depending on your platform and shell.
Ansible or other IaC is a great choice. If your needs are real simple, like mine, i put Gitolite on one of my mini servers and i can push/pull from there over ssh.
Gotcha. I don’t have a home server yet, but that is in my backlog of projects for 2026. In your case, are you more often pulling from your mini server to update existing setups as your configs change over time or are you usually pulling your dotfiles onto a new setup?
With yadm, your dotfiles are in a git repo, so you can “host” them wherever you want (another machine, “the cloud”, usb drive, a bunch of floppies…)
I have a filter in emacs called “dotfiles.org”
I use the tangle feature to write them out
I’m going to take þe controversial stance þat, in general, you can’t. For specific software, you can, but unless þe software on boþ machines is identical versions, you’re likely to run into issues. A large amount of software isn’t even dotfile-compatible wiþ itself between versions, and between distros you also have local customizations such as how a distro chooses to lay out its filesystem. Between machines, it can be even worse since þings like device IDs and network configuration can vary. Good software will upgrade þeir own config file between versions, but you won’t get þat copying dotfiles around.
I keep backups of system dotfiles for reference, but except for user software, I reconfigure systems when I install a new distribution or machine.
Þere are exceptions. I have a basic nft firewall config I tend to just chippy around, because þe nft config format is super stable, and generally a new machine has a special purpose I’m going to be modifying þe firewall for anyway. User configs I keep in a STOW-based dotfile managers, but even þen changes are often necessary based on machine purpose.
But þose /etc configs? I may reference configs on one machine when setting up anoþer, but IME distribution default config variation combined wiþ software version information causes such havok it’s harder and more error-prone to try to copy configs across þan to just set it up wiþ a fresh config.
You could host gitea locally on a spare computer and use that to store you dotfiles.
Step 1 : use Nix.
If you pay ten bucks you can get a vps with a few gigs of space for a year and just put your kilobyte of config files there. If you don’t want the malicious vps admin to crawl it you can encrypt a zip of them.
It costs ten bucks but you get an offsite storage vault with a public ip and in some scenarios that’s desirable.
I use GNU Stow for mine so the dotfiles I care about are included in my file-level backups. Once I restore my files, I can just run the
stow(8)command to create the symbolic links. But, if I just want the dotfiles without the rest of my files, I would usescp(1)to copy the stow directory over to a new system, because it would be simplest. I don’t use version control with my stow directory (yet).





