Two passes, both aimed at a consistent experience rather than a faithful
snapshot of each machine's accidents.
Standardisation. Audited every host-layer config present on more than one
machine and asked whether the difference was intent or drift:
- mpv was byte-identical; swayimg differed only because system76 still
had the shipped default and the work laptop had the real config; bob
differed by one setting the work laptop was simply missing.
- user-dirs.dirs disagreed with BOTH machines and with zshenv, which has
said $HOME/downloads all along. Standardised on that.
- mimeapps.list is now the union of both machines' associations.
- swaync's config and style are shared; only wallust's generated
colors.css stays per host, alongside hypr's and waybar's.
All of the above moved to common/.
Dropped as pure state rather than config: gtk-2.0 (file-chooser geometry),
pavucontrol.ini (window size), zoom.conf (a per-install random_key) and
zoomus.conf (panel widths). gtk-3.0 stays per host — its bookmarks encode
the two different home directories.
App config. GIMP, inkscape, FreeCAD, cura, OrcaSlicer, LightBurn and OBS
all hold real settings, so a curated subset of each is now tracked:
settings, keybindings and user content, but not session state, tool
options, device lists or window geometry. kicad is skipped — both library
tables hold a single entry, i.e. untouched defaults.
Content lives once in common/ even when only one machine has the app; the
host configs decide who gets the link. That is the distinction that lets
53% of link sources be shared while the NAS still does not get GIMP.
Two exclusions on credential grounds: obs-studio/plugin_config holds a
websocket server_password, and gh is dropped entirely because `gh auth
login` writes a token into hosts.yml — now also blocked by name.
dotfiles
Everything that makes a machine mine. One branch, four hosts, no per-machine branches — see Why not a branch per machine below.
Bootstrap a bare machine
git clone --recurse-submodules <remote> ~/.dotfiles
cd ~/.dotfiles && ./install
cp common/zsh/secrets.zsh.example ~/.secrets.zsh && chmod 600 ~/.secrets.zsh # then fill it in
common/bin/pkg-restore # install the packages
sudo install -m755 hosts/<host>/sbin/* /usr/local/bin/ # if that host has any
install picks its host layer from hostname, lowercased. If there is no
meta/hosts/<hostname>.conf.yaml it stops rather than silently applying only
the base config — a half-configured machine that reports success is worse than
a clear failure. For a new machine, copy the closest host config and edit.
Layout
| Path | What lives here |
|---|---|
meta/base.conf.yaml |
links every host gets |
meta/hosts/<host>.conf.yaml |
links only that host gets |
common/ |
host-agnostic config and scripts |
hosts/<host>/ |
that machine's deltas |
hosts/<host>/bin |
scripts only that machine needs; shadows common/bin on PATH |
hosts/<host>/sbin |
scripts needing root at /usr/local/bin; not installed by ./install |
packages/ |
what is installed, per host |
Where host-specific things go
The rule is that a file is shared unless the machines genuinely disagree, and when they do the disagreement is expressed as a small file rather than a fork.
- zsh —
common/zsh/{zshenv,zshrc}sourcehosts/$DOTFILES_HOST/zsh/*.zsh(interactive) and*.zshenv(all shells). Host fragments are 1–7 lines each. Things that vary by distro rather than by machine — the oh-my-zsh prefix, the zsh-syntax-highlighting path,fdvsfdfind— are probed incommon/instead, so they need no host file at all. - hyprland —
common/hypr/hyprland.confsources the host layer twice:local-env.confnear the top for anything used later in the file ($browser,env,monitor), andlocal.confat the bottom for gaps, binds and overrides. Hyprland resolves variables in file order, so a single source at the end would leave$browserundefined at its first use. - waybar — one shared
configandstyle.css; the latter@importslocal.cssfor per-screen padding.colors.cssis pywal output, regenerated byupdate_colors.sh. - git — shared settings in
common/git/config, identity via anincludeofhosts/<host>/git/identity.
Singleton automations
inbox-tidy, movie-recs, rent-utilities and ddns must run on mainframe
and nowhere else. They mutate a live mailbox, send notifications, send bills,
and update live DNS records. Two independent guards:
- The units live only in
hosts/mainframe/systemd/, nevercommon/, so no other host's config can reference them. - Each
.servicecarriesConditionHost=mainframe. If one is ever enabled on the wrong machine, systemd logs a condition failure instead of running it.
The scripts themselves are in hosts/mainframe/bin. hypr_refresh on system76
is not a singleton — it is per-machine and correctly unguarded.
Verify after any change: systemctl --user list-timers --all.
~/.local/bin is not this repo
It used to be a symlink to scripts/, with GOPATH pointing inside it. Every
go install and pipx install therefore wrote into version control — 2.2 GB
on the work laptop, 426 MB on the personal one. git status was permanently
unusable, which is why nothing was committed for a year.
Now ~/.local/bin is an ordinary directory owned by package managers, GOPATH
is ~/.local/share/go, and this repo's common/bin and hosts/$HOST/bin go on
PATH directly. Do not link a directory that other tools write into.
Secrets
Never in the repo. ~/.secrets.zsh, mode 600, sourced at the end of zshenv
so non-interactive shells get it too — deliberately not rbw, which would add
a vault round-trip to every script and every ssh host cmd. rbw stays for
lazy, interactive use, as in common/zsh/opencode.zsh.
Back up edits by hand as ~/.secrets.zsh.pre-<thing>, matching the convention
used across ~/config.
Keeping it honest
dots reports uncommitted files, ahead/behind, and whether the package
manifest has gone stale. zshrc calls dots --nag at login, which prints
nothing when everything is clean.
After installing something worth keeping: pkg-snapshot, then commit the diff.
Why not a branch per machine
That was the previous design. A shared change had to be cherry-picked into four branches by hand, so it got made locally and never committed; the next change landed on top of an uncommitted one, and the cost of untangling grew until nobody committed at all. By September 2026 there were 146 dirty files across three machines, two histories that had never met, and a NAS that had never been enrolled. Host layers cost a few small files and remove the merge entirely.