4 ms·
I store my dotfiles in GitHub, using deploy keys to give read-only access to devices not under my complete control (e.g., work computers, cloud shells). The re
by xenophonf 5y ago
I store my dotfiles in GitHub, using deploy keys to give read-only access to devices not under my complete control (e.g., work computers, cloud shells). The repo is private but I could in theory make it public. Nothing sensitive like a password gets committed, although I worry about inadvertently leaking information like usernames or pathnames that could be used against me in a data aggregation attack. Initializing my home directory is a simple matter of running `git init`, then `git remote add`, and finally a pull that overwrites everything not otherwise .gitignored.
Among 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.