I blogged about it here https://her.esy.fun/posts/0021-my-personal-environment-sync/...
Ask HN: How do you share your personal setup over different computers?
21–30 of 42 posts
Re: Ask HN: How do you share your personal setup over different computers?
#22Re: Ask HN: How do you share your personal setup over different computers?
#23Among my personal computers, I'm running syncthing. I sync my Unix home directory separately from my documents, pictures, etc. folders, with some carefully crafted .stignore files that largely (but not entirely) mirror my .gitignore files (where they exist). To get around the fact that .stignore files themselves aren't synced, the actual list of things to not sync is stored in a separate file and #include-ed into the .stignore file. The first time I sync my home directory, I set syncthing to read-only mode with a custom .stignore file that excludes ~/.config, ~/.cache, etc., switch to including the .stignore.common file, then switch to bi-directional operation.
I have shell scripts that install the usual niceties on Windows, Ubuntu, macOS, and Ubuntu on Windows.
I use Firefox Sync for browser stuff, although not every extension supports cloud synchronization (and the UI for the ones that do is rather clumsy).
For Ubuntu on Windows, I've symlinked key folders to their Windows equivalents, e.g., Documents. I run synchthing both on Windows (in the background using synchtrayzor) and on WSL (in the background using GNU screen). The WSL syncthing instance just takes care of my Unix home directory since the Windows syncthing handles everything else.
For VMs, I only sync the home directory.
I used to use roaming profiles and folder redirection and NFS and GPOs and SaltStack and so on and so forth, but those things are all really, really brittle. And slow. And buggy. NFS-mounted home directories have issues common to all Unix operating systems, chief among them no reliable offline mode. Windows has the Offline Files feature, but it breaks certain file system access patterns very badly. Few Windows apps correctly distinguish among the various shell folders, so they end up putting the wrong stuff in APPDATA or APPDATALOCAL—or worse, they put stuff in the root of USERPROFILE. And trying to do silent installs of Windows apps is such a pain. So treating each laptop/desktop as a standalone computer plus syncing things here and there works out much better in the end. I kind of hate it but can't fight it any more. At least I've (thus far) successfully resisted Apple/Microsoft accounts and iCloud/OneDrive/Google Drive/Dropbox/etc., although that's probably going to change once Windows 11 has successfully been forced down everyone's throat.
Re: Ask HN: How do you share your personal setup over different computers?
#24Re: Ask HN: How do you share your personal setup over different computers?
#25As others have said, on Ubuntu/Linux, ansible. On windows, I'm still working on it, but chocolatey provides a decent starter for getting dev tools I need installed, just gotta figure out a way to save and restore configs.
winget can do that tool
Re: Ask HN: How do you share your personal setup over different computers?
#26I use GNU Guix and check my configuration files in a private git repo
Re: Ask HN: How do you share your personal setup over different computers?
#27I use a `.dotfiles` github repository with a `setup` or `setup.cmd`, depending if its windows or *nix and which host. Additionally, I keep my config files in `.dotfiles/etc` and the setup scripts softlink the files to the right locations in $HOME. Examples: - .dotfiles/etc/git/.gitconfig - .dotfiles/windows/setup.cmd - .dotfiles/linux/setup_ubuntu - .dotfiles/macos/setup The setup script depends on the OS, using `sco…
I think this is much better and you might consider it
Re: Ask HN: How do you share your personal setup over different computers?
#28Getting a new machine requires a git pull, running nix rebuild / nix darwin rebuild and my machine is set up “exactly” the same as the other machine. Exact configuration, exact versions of software, completely deterministic.
No running custom GNU stow scripts that I used to do. No fragile non deterministic Ansible playbooks that randomly fail.
The caveat, Nix requires a time/investment from a user to learn (search hacker news post for nix). It’s language can be a bit unusual if not used ML style languages, it’s paradigm is a bit different to what you probably know, documentation is sparse although there’s more of it now and a good few blog posts teaching it.
Re: Ask HN: How do you share your personal setup over different computers?
#29I use a `.dotfiles` github repository with a `setup` or `setup.cmd`, depending if its windows or *nix and which host. Additionally, I keep my config files in `.dotfiles/etc` and the setup scripts softlink the files to the right locations in $HOME. Examples: - .dotfiles/etc/git/.gitconfig - .dotfiles/windows/setup.cmd - .dotfiles/linux/setup_ubuntu - .dotfiles/macos/setup The setup script depends on the OS, using `sco…
I used to have this same setup, but recently I switched to a bare git repo following the advice of this article: https://www.atlassian.com/git/tutorials/dotfiles I think this is much better and you might consider it
Re: Ask HN: How do you share your personal setup over different computers?
#30edit: typo