-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture and the Three Layer Model
dotfiles-core is the keystone of a nine-repo dotfiles system. The whole design exists to answer one question cleanly: where does a given piece of config belong? Everything follows from the three-layer model.
| Layer | Lives in | Examples |
|---|---|---|
| Core |
this repo, vendored into each OS repo via git subtree
|
zsh modules, tmux base, nvim, git/delta |
| OS-native | dotfiles-{MacBook,Windows,Debian,Fedora,Arch,openSUSE,Alpine,Gentoo} |
package manager, clipboard shim, paths |
| Role / offensive | dotfiles-Kali |
engagement scaffolding, C2, Impacket, wordlists |
Before any file lands in Core, run it through these two questions:
- Does it change when the operating system changes? (package manager, paths, clipboard backend) → it belongs in the OS repo.
-
Does it change when you as an operator change? (C2, wordlists,
engagement layouts) → it belongs in
dotfiles-Kali.
If the answer to both is "no" — it is the same everywhere — then it is Core and lives here.
Previously each repo carried its own copy of Core, and drift between copies
was caught after the fact with a core-diff.sh reconciliation script. That
approach works at four repos. At nine it doesn't — you spend all your time doing
N-way reconciliation.
This repo flips the model: Core is authored once, here, then pulled into
each OS repo as a vendored core/ subtree. There is no more N-way
reconciliation because there is only one authoritative copy.
Each machine repo (for example dotfiles-Fedora) vendors this repo under
core/:
# one-time, inside the OS repo:
git subtree add --prefix=core https://github.com/<you>/dotfiles-core main --squashThat physically copies Core into core/ and commits it. The repo now clones
and works with no submodule flags — important, since these are public
showcase repos people will browse.
To update every OS repo after a Core change, run the loop helper from this repo:
./scripts/sync-core.sh # subtree-pulls main into all 9 OS repos
./scripts/sync-core.sh --dry-runThe OS repo's bootstrap.sh then symlinks core/zsh/*.zsh, core/tmux/,
core/nvim/, core/git/, core/starship/, core/mise/, and core/bin/ into
place alongside its own OS-native files.
This is the most-asked design question, so it's worth spelling out.
A submodule stores a pointer (a commit SHA), so a fresh clone is empty
until you run git submodule update --init. A subtree vendors the actual
files, so every repo is self-contained and clone-and-go. For public portfolio
repos people will browse, self-contained wins.
chezmoi (one repo + per-OS templates) is the most DRY answer, and it is the right move if you ever want to collapse nine repos into one. It trades the nine-repo breadth-portfolio for minimalism. This system deliberately keeps the portfolio. Switching to chezmoi later would be a content migration, not a rewrite, because the Core files here are already plain and OS-agnostic.
A subtle but important distinction: not everything in this repo is vendored out to the OS repos.
-
bin/— shipped. The cross-OSclip/clip-pasteclipboard shims are vendored into every OS repo (they're listed incore.manifest). -
scripts/— dev tooling.audit-core.sh,test-core.sh,bench-core.sh,sync-core.sh, etc. run the quality gate here and are never vendored out. They live in the audit's allowlist rather than the manifest.
The line is: if it runs on a target machine, it's bin/ and in the manifest;
if it maintains this repo, it's scripts/ and in the allowlist.
core.manifest is the canonical inventory of what Core ships. The audit
(scripts/audit-core.sh) enforces it in both directions:
- every path listed in the manifest must exist on disk, and
- every tracked file must be either listed in the manifest or in the audit's repo-meta allowlist (docs, CI config, dev tooling).
Adding a new Core file means adding its path to core.manifest in the same
change. See
CONTRIBUTING.md
for the full checklist.
- Core — this repo. Authored once, vendored everywhere.
-
OS repos —
dotfiles-{MacBook, Windows, Debian, Fedora, Arch, openSUSE, Alpine, Gentoo}.Fedorais the Linux template;Arch,openSUSE,Alpine, andGentooare stamped from it (seePORTING-MATRIX.md).MacBook(Homebrew) andWindowsare their own lineages. -
Role repo —
dotfiles-Kali. Debian-family, plus an offensive role layer that adds anoffensivestage to the zsh loader.
- The Zsh Module System — how the vendored zsh modules load and why their order matters.
- Tools, Aliases & Functions — what Core gives you in the shell.
dotfiles-core — the Core layer of
a nine-repo dotfiles system · authored once, vendored everywhere via git subtree.
Home · Architecture · Zsh · Tools · Neovim · tmux · FAQ
Source for these pages lives in
wiki/ — edit there and
sync. · core-help in any shell for the live cheat sheet.
Concepts
Reference
Operating it
Project
Repo links