@sebastienrousseau/dotfiles 0.2.519 → 0.2.521
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +200 -0
- package/LICENSE-APACHE +190 -0
- package/{LICENSE → LICENSE-MIT} +1 -1
- package/README.md +1172 -166
- package/install.sh +77 -11
- package/package.json +8 -8
- package/tools/README.md +49 -0
- package/tools/ci/install-chezmoi-verified.sh +68 -0
- package/docs/.vitepress/reports/localization-readability-audit.md +0 -73
- package/docs/AI.md +0 -179
- package/docs/CNAME +0 -1
- package/docs/CONFIG_STRATEGY.md +0 -124
- package/docs/COPYRIGHT +0 -7
- package/docs/GOVERNANCE.md +0 -98
- package/docs/MAINTAINERS.md +0 -41
- package/docs/NAMING_CONVENTIONS.md +0 -102
- package/docs/OPENCODE.md +0 -127
- package/docs/README.md +0 -84
- package/docs/STRUCTURE.md +0 -102
- package/docs/adr/ADR-001-ci-cd-pipeline.md +0 -118
- package/docs/adr/ADR-002-shell-performance.md +0 -130
- package/docs/adr/ADR-003-security-first.md +0 -158
- package/docs/adr/ADR-004-cli-architecture.md +0 -171
- package/docs/adr/ADR-005-chezmoi-choice.md +0 -99
- package/docs/adr/ADR-006-shell-selection.md +0 -124
- package/docs/adr/ADR-007-multi-shell-parity.md +0 -62
- package/docs/adr/ADR-008-alias-system-architecture.md +0 -95
- package/docs/adr/ADR-009-wallpaper-driven-theming.md +0 -131
- package/docs/adr/ADR-010-starship-transient-prompt.md +0 -144
- package/docs/adr/ADR-011-nushell-tier3-keep.md +0 -144
- package/docs/adr/ADR-012-ai-fleet-local-proxy.md +0 -79
- package/docs/adr/README.md +0 -40
- package/docs/architecture/AI_COST_OPTIMIZATION.md +0 -144
- package/docs/architecture/ARCHITECTURE.md +0 -117
- package/docs/architecture/INTEROP.md +0 -44
- package/docs/architecture/REPO_LAYOUT.md +0 -241
- package/docs/architecture/WALKTHROUGH.md +0 -86
- package/docs/architecture/fleet-deployment.md +0 -77
- package/docs/archive/EUXIS_2026_REVIEW.md +0 -127
- package/docs/archive/LEGACY_ROADMAP.md +0 -6
- package/docs/archive/MILESTONE_v0.2.493.md +0 -47
- package/docs/archive/PLAN.md +0 -199
- package/docs/archive/REPO_AUDIT.md +0 -31
- package/docs/articles/.pages +0 -6
- package/docs/articles/2026-07-05-custom-mkdocs-material-dark-theme.md +0 -216
- package/docs/articles/2026-07-05-fish-startup-abbr.md +0 -153
- package/docs/articles/2026-07-05-master-to-main-rename-runbook.md +0 -128
- package/docs/articles/index.md +0 -36
- package/docs/guides/INSTALL.md +0 -144
- package/docs/guides/NEOVIM_IDE_GUIDE.md +0 -61
- package/docs/guides/THEMING.md +0 -230
- package/docs/guides/TROUBLESHOOTING.md +0 -176
- package/docs/guides/WSL2_NIX_TROUBLESHOOTING.md +0 -792
- package/docs/index.md +0 -132
- package/docs/interop/A2A.md +0 -39
- package/docs/interop/POWERSHELL.md +0 -102
- package/docs/manual/00-introduction.md +0 -89
- package/docs/manual/01-concepts/01-architecture.md +0 -138
- package/docs/manual/01-concepts/02-trust-model.md +0 -183
- package/docs/manual/01-concepts/03-theme-engine.md +0 -186
- package/docs/manual/01-concepts/04-fleet.md +0 -148
- package/docs/manual/01-concepts/05-self-healing.md +0 -204
- package/docs/manual/02-tutorials/01-first-install.md +0 -197
- package/docs/manual/02-tutorials/02-add-wallpaper.md +0 -216
- package/docs/manual/02-tutorials/03-create-profile.md +0 -244
- package/docs/manual/02-tutorials/04-encrypt-secret.md +0 -281
- package/docs/manual/02-tutorials/05-deploy-fleet.md +0 -283
- package/docs/manual/03-reference/01-dot-cli.md +0 -450
- package/docs/manual/03-reference/02-config-files.md +0 -265
- package/docs/manual/03-reference/03-environment.md +0 -124
- package/docs/manual/03-reference/04-templates.md +0 -190
- package/docs/manual/03-reference/05-feature-flags.md +0 -187
- package/docs/manual/04-cookbook/01-recipes.md +0 -285
- package/docs/manual/04-cookbook/02-troubleshooting.md +0 -351
- package/docs/manual/04-cookbook/03-faq.md +0 -175
- package/docs/manual/05-appendices/A-platform-matrix.md +0 -101
- package/docs/manual/05-appendices/B-security-checklist.md +0 -85
- package/docs/manual/05-appendices/C-glossary.md +0 -40
- package/docs/manual/05-appendices/D-bibliography.md +0 -58
- package/docs/manual/05-appendices/E-license.md +0 -38
- package/docs/manual/_toc.yml +0 -58
- package/docs/manual/command-index.md +0 -155
- package/docs/manual/concept-index.md +0 -168
- package/docs/manual/index.md +0 -66
- package/docs/operations/ARCHITECTURE_ROADMAP.md +0 -7
- package/docs/operations/ATTESTATION.md +0 -44
- package/docs/operations/CI_CADENCE.md +0 -107
- package/docs/operations/CI_COMPOSITES.md +0 -156
- package/docs/operations/COMPLETIONS.md +0 -123
- package/docs/operations/COVERAGE.md +0 -204
- package/docs/operations/DRIFT.md +0 -107
- package/docs/operations/HARD_AUDIT_2026.md +0 -631
- package/docs/operations/MAINTENANCE.md +0 -63
- package/docs/operations/MANIFEST.md +0 -127
- package/docs/operations/MIGRATION.md +0 -109
- package/docs/operations/OPERATIONS.md +0 -188
- package/docs/operations/PERFORMANCE.md +0 -133
- package/docs/operations/REGISTRY.md +0 -90
- package/docs/operations/RELEASE_PIPELINE.md +0 -128
- package/docs/operations/RELIABILITY.md +0 -122
- package/docs/operations/RFC_v0_2_503_reorganization.md +0 -280
- package/docs/operations/ROADMAP.md +0 -10
- package/docs/operations/ROADMAP_2026.md +0 -7
- package/docs/operations/ROADMAP_V0_2_503.md +0 -10
- package/docs/operations/TESTING.md +0 -216
- package/docs/operations/TRACEABILITY.md +0 -43
- package/docs/operations/TRUSTED_AGENT_WORKSTATION.md +0 -65
- package/docs/operations/VERSION_SYNC.md +0 -393
- package/docs/reference/ALIASES.md +0 -131
- package/docs/reference/ALIASES_CHEATSHEET.md +0 -32
- package/docs/reference/ALIASES_DEPRECATIONS.md +0 -13
- package/docs/reference/FEATURES.md +0 -66
- package/docs/reference/FONTS.md +0 -112
- package/docs/reference/POWERSHELL_PARITY.md +0 -82
- package/docs/reference/PROFILES.md +0 -69
- package/docs/reference/SCREENSHOTS.md +0 -121
- package/docs/reference/SCRIPTS.md +0 -71
- package/docs/reference/SUPPORT_MATRIX.md +0 -80
- package/docs/reference/THEMES.md +0 -117
- package/docs/reference/TOOLS.md +0 -110
- package/docs/reference/UTILS.md +0 -242
- package/docs/registry.json +0 -6
- package/docs/schema/dot-env-v1.json +0 -110
- package/docs/schema/dot-registry-v1.json +0 -33
- package/docs/security/AI_ACT_COMPLIANCE.md +0 -94
- package/docs/security/AUDIT_BYPASS.md +0 -103
- package/docs/security/AUTOMATION_SECRETS.md +0 -26
- package/docs/security/CI_EGRESS_ALLOWLIST.md +0 -127
- package/docs/security/CI_PINNING.md +0 -129
- package/docs/security/COMMIT_SIGNING.md +0 -138
- package/docs/security/COMPLIANCE.md +0 -458
- package/docs/security/DEPS_DEV_EXCEPTIONS.md +0 -86
- package/docs/security/DISCLOSURE.md +0 -130
- package/docs/security/ENCRYPTION.md +0 -57
- package/docs/security/FMEA.md +0 -159
- package/docs/security/FUZZING.md +0 -114
- package/docs/security/HISTORY_FILTERING.md +0 -132
- package/docs/security/INCIDENT_RESPONSE.md +0 -579
- package/docs/security/INSTALL_VERIFICATION.md +0 -122
- package/docs/security/KEYS.md +0 -49
- package/docs/security/KEY_ROTATION.md +0 -303
- package/docs/security/MCP_POLICY.md +0 -78
- package/docs/security/POLICY_RELEASES.md +0 -37
- package/docs/security/README.md +0 -28
- package/docs/security/SCORECARD.md +0 -195
- package/docs/security/SECRETS.md +0 -158
- package/docs/security/SECURITY.md +0 -45
- package/docs/security/SECURITY_CHECKLIST.md +0 -55
- package/docs/security/SHELL_EXEMPTIONS.md +0 -145
- package/docs/security/SOUP_REGISTER.md +0 -36
- package/docs/security/THREAT_MODEL.md +0 -130
- package/docs/security/VERIFICATION_VALIDATION.md +0 -228
- package/docs/security/VERIFY_RELEASE.md +0 -201
- package/docs/security/security-pubkey.asc +0 -15
- package/docs/stylesheets/extra.css +0 -444
- package/docs/themes/README.md +0 -10
- package/docs/themes/VISUAL_INTEGRITY_REPORT.md +0 -30
- package/docs/themes/hero-shot.svg +0 -78
- package/scripts/README.md +0 -123
- package/scripts/ci/check-copyright-headers.sh +0 -8
- package/scripts/ci/check-shell-preamble.sh +0 -8
- package/scripts/ci/guard-gitleaks-checkout.sh +0 -8
- package/scripts/demo/record.sh +0 -43
- package/scripts/diagnostics/a2a-conformance.sh +0 -163
- package/scripts/diagnostics/alias-governance.sh +0 -138
- package/scripts/diagnostics/aliases-cheatsheet.sh +0 -74
- package/scripts/diagnostics/aliases-manifest.sh +0 -77
- package/scripts/diagnostics/benchmark.sh +0 -408
- package/scripts/diagnostics/conflicts.sh +0 -73
- package/scripts/diagnostics/doctor-unified.sh +0 -39
- package/scripts/diagnostics/doctor.sh +0 -751
- package/scripts/diagnostics/drift-dashboard.sh +0 -202
- package/scripts/diagnostics/health.sh +0 -623
- package/scripts/diagnostics/history-analysis.sh +0 -86
- package/scripts/diagnostics/mcp-doctor.sh +0 -582
- package/scripts/diagnostics/perf.sh +0 -453
- package/scripts/diagnostics/scorecard.sh +0 -119
- package/scripts/diagnostics/secret-governance.sh +0 -65
- package/scripts/diagnostics/security-score.sh +0 -467
- package/scripts/diagnostics/smoke-test.sh +0 -88
- package/scripts/diagnostics/snapshot.sh +0 -90
- package/scripts/diagnostics/verify.sh +0 -108
- package/scripts/diagnostics/verify_state.sh +0 -73
- package/scripts/diagnostics/version-locks.sh +0 -94
- package/scripts/diagnostics/workstation-attestation.sh +0 -187
- package/scripts/dot/commands/agent.sh +0 -485
- package/scripts/dot/commands/agents.sh +0 -336
- package/scripts/dot/commands/ai.sh +0 -587
- package/scripts/dot/commands/aliases.sh +0 -277
- package/scripts/dot/commands/appearance.sh +0 -110
- package/scripts/dot/commands/completion.sh +0 -134
- package/scripts/dot/commands/core.sh +0 -217
- package/scripts/dot/commands/diagnostics.sh +0 -265
- package/scripts/dot/commands/env-emit.sh +0 -203
- package/scripts/dot/commands/fleet.sh +0 -688
- package/scripts/dot/commands/init.sh +0 -185
- package/scripts/dot/commands/lint.sh +0 -208
- package/scripts/dot/commands/manual.sh +0 -169
- package/scripts/dot/commands/meta.sh +0 -333
- package/scripts/dot/commands/patterns.sh +0 -55
- package/scripts/dot/commands/registry.sh +0 -419
- package/scripts/dot/commands/restore.sh +0 -232
- package/scripts/dot/commands/secrets.sh +0 -296
- package/scripts/dot/commands/security.sh +0 -102
- package/scripts/dot/commands/tools.sh +0 -556
- package/scripts/dot/data/alias-deprecations.tsv +0 -2
- package/scripts/dot/powershell/Dot.psm1 +0 -319
- package/scripts/fonts/install-nerd-fonts.sh +0 -75
- package/scripts/fonts/patch-fonts.sh +0 -36
- package/scripts/git-hooks/install.sh +0 -12
- package/scripts/git-hooks/pre-commit +0 -12
- package/scripts/git-hooks/pre-commit-audit.sh +0 -146
- package/scripts/git-hooks/pre-push +0 -105
- package/scripts/git-hooks/prepare-commit-msg +0 -29
- package/scripts/lib/secrets_provider.sh +0 -185
- package/scripts/ops/ai-setup.sh +0 -71
- package/scripts/ops/bundle.sh +0 -104
- package/scripts/ops/chaos.sh +0 -50
- package/scripts/ops/chezmoi-apply.sh +0 -333
- package/scripts/ops/chezmoi-diff.sh +0 -16
- package/scripts/ops/chezmoi-remove.sh +0 -46
- package/scripts/ops/chezmoi-update.sh +0 -63
- package/scripts/ops/heal-chezmoi.sh +0 -87
- package/scripts/ops/heal-system.sh +0 -129
- package/scripts/ops/heal-tools.sh +0 -297
- package/scripts/ops/heal.sh +0 -223
- package/scripts/ops/post-apply-repair.sh +0 -107
- package/scripts/ops/prewarm.sh +0 -128
- package/scripts/ops/release.sh +0 -262
- package/scripts/ops/rollback.sh +0 -604
- package/scripts/ops/setup.sh +0 -138
- package/scripts/ops/teleport.sh +0 -34
- package/scripts/qa/check-version-consistency.sh +0 -124
- package/scripts/qa/coverage-baseline.sh +0 -61
- package/scripts/qa/docs-coverage.sh +0 -112
- package/scripts/qa/examples-coverage.sh +0 -94
- package/scripts/qa/powershell-contract.ps1 +0 -95
- package/scripts/qa/reliability-audit.sh +0 -139
- package/scripts/qa/scorecard-snapshot.sh +0 -128
- package/scripts/qa/traceability-coverage.sh +0 -117
- package/scripts/qa/validate-examples.sh +0 -27
- package/scripts/qa/wsl-contract.sh +0 -12
- package/scripts/secrets/age-init.sh +0 -82
- package/scripts/secrets/create-secrets-file.sh +0 -46
- package/scripts/secrets/encrypt-ssh-key.sh +0 -44
- package/scripts/security/backup.sh +0 -58
- package/scripts/security/check-disclosure-key-expiry.sh +0 -111
- package/scripts/security/dns-doh.sh +0 -52
- package/scripts/security/encryption-check.sh +0 -55
- package/scripts/security/enforce-policies.sh +0 -335
- package/scripts/security/firewall.sh +0 -91
- package/scripts/security/lock-configs.sh +0 -67
- package/scripts/security/lock-screen.sh +0 -56
- package/scripts/security/manage-secrets.sh +0 -429
- package/scripts/security/ssh-cert.sh +0 -204
- package/scripts/security/telemetry-kill.sh +0 -51
- package/scripts/security/usb-safety.sh +0 -52
- package/scripts/theme/apply-gnome-theme.sh +0 -333
- package/scripts/theme/extract-heic-frames.sh +0 -115
- package/scripts/theme/extract-theme.py +0 -742
- package/scripts/theme/install-boot-logo.sh +0 -63
- package/scripts/theme/install-catppuccin-themes.sh +0 -371
- package/scripts/theme/install-cursors.sh +0 -26
- package/scripts/theme/install-file-icons.sh +0 -27
- package/scripts/theme/install-grub-theme.sh +0 -62
- package/scripts/theme/install-lock-icon.sh +0 -31
- package/scripts/theme/merge-wallpaper.sh +0 -146
- package/scripts/theme/rebuild-themes.sh +0 -544
- package/scripts/theme/switch.sh +0 -449
- package/scripts/theme/wallpaper-rotate.sh +0 -137
- package/scripts/theme/wallpaper-sync.sh +0 -690
- package/scripts/tools/cmatrix.sh +0 -22
- package/scripts/tools/detect-collisions.py +0 -103
- package/scripts/tools/emoji-picker.sh +0 -49
- package/scripts/tools/figlet-banner.sh +0 -19
- package/scripts/tools/log-rotate.sh +0 -31
- package/scripts/tools/lolcat-wrap.sh +0 -20
- package/scripts/tools/pipes.sh +0 -49
- package/scripts/tuning/linux.sh +0 -186
- package/scripts/tuning/macos.sh +0 -56
- package/scripts/uninstall.sh +0 -86
- package/scripts/version-sync.sh +0 -654
- package/templates/chezmoi-data/geekom-a9.toml.example +0 -21
- package/templates/chezmoi-data/mac-m1.toml.example +0 -16
- package/templates/chezmoi-data/mac-t2-linux.toml.example +0 -21
- package/templates/chezmoi-data/surface-pro-7p.toml.example +0 -21
- package/templates/projects/go/.github/workflows/ci.yml +0 -31
- package/templates/projects/go/README.md +0 -7
- package/templates/projects/go/cmd/__PROJECT_NAME__/main.go +0 -8
- package/templates/projects/go/go.mod +0 -3
- package/templates/projects/go/go.sum +0 -0
- package/templates/projects/molecule/README.md +0 -7
- package/templates/projects/molecule/converge.yml +0 -7
- package/templates/projects/molecule/molecule.yml +0 -16
- package/templates/projects/node/.github/workflows/ci.yml +0 -30
- package/templates/projects/node/README.md +0 -7
- package/templates/projects/node/package-lock.json +0 -12
- package/templates/projects/node/package.json +0 -10
- package/templates/projects/node/src/index.js +0 -3
- package/templates/projects/packer/README.md +0 -15
- package/templates/projects/packer/main.pkr.hcl +0 -15
- package/templates/projects/python/.github/workflows/ci.yml +0 -34
- package/templates/projects/python/README.md +0 -7
- package/templates/projects/python/pyproject.toml +0 -25
- package/templates/projects/python/src/__PROJECT_NAME__/__init__.py +0 -2
- package/templates/projects/python/tests/test_basic.py +0 -3
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# The Theme Engine
|
|
6
|
-
|
|
7
|
-
`.dotfiles` generates terminal color palettes directly from wallpaper images. There are no hand-crafted themes — dominant colors are extracted via K-Means clustering in CIELAB color space, mapped to ANSI slots, and enforced to WCAG AAA contrast.
|
|
8
|
-
|
|
9
|
-
This chapter explains the pipeline end to end.
|
|
10
|
-
|
|
11
|
-
## The Why
|
|
12
|
-
|
|
13
|
-
Hand-crafted themes are expensive to maintain and constrain the user to a fixed palette. Wallpaper-driven themes:
|
|
14
|
-
|
|
15
|
-
- **Adapt to any wallpaper** — drop a new image, run `dot theme rebuild`, get a new theme
|
|
16
|
-
- **Guarantee contrast** — WCAG AAA is enforced algorithmically, not by taste
|
|
17
|
-
- **Avoid IP issues** — the engine never redistributes Apple/Microsoft wallpapers; it works with whatever is already on the user's system
|
|
18
|
-
- **Produce matched pairs** — every wallpaper yields a dark and light variant with a golden-ratio brightness relationship
|
|
19
|
-
|
|
20
|
-
## The Pipeline
|
|
21
|
-
|
|
22
|
-
```mermaid
|
|
23
|
-
graph LR
|
|
24
|
-
A[Wallpaper image<br/>any format] --> B[ImageMagick<br/>downsample + RGB extract]
|
|
25
|
-
B --> C[Random subsample<br/>2000 pixels]
|
|
26
|
-
C --> D[sRGB → CIE XYZ → CIELAB]
|
|
27
|
-
D --> E[K-Means++ clustering<br/>k=8, 3 runs, best inertia]
|
|
28
|
-
E --> F[Map clusters to<br/>ANSI hue slots]
|
|
29
|
-
F --> G[Enforce WCAG AAA<br/>contrast adjustments]
|
|
30
|
-
G --> H[Generate theme TOML<br/>16 ANSI + UI + app mappings]
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
### Stage 1 — Pixel Extraction
|
|
34
|
-
|
|
35
|
-
`ImageMagick` resizes the wallpaper to 80×80 maximum dimension (preserving aspect ratio) and emits pixel-by-pixel text output:
|
|
36
|
-
|
|
37
|
-
```sh
|
|
38
|
-
magick input.heic -resize 80x80\> -depth 8 txt:-
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
At 80×80 the image has ~6,400 pixels. For dynamic HEIC files (`image.heic[0]`, `image.heic[1]`), each frame is processed independently.
|
|
42
|
-
|
|
43
|
-
### Stage 2 — Subsampling
|
|
44
|
-
|
|
45
|
-
2,000 pixels are sampled uniformly from the downsampled image using a seeded PRNG (`random.Random(42)`). This gives a reproducible run and keeps K-Means iteration fast.
|
|
46
|
-
|
|
47
|
-
### Stage 3 — Color Space Conversion
|
|
48
|
-
|
|
49
|
-
Each RGB triplet is converted:
|
|
50
|
-
|
|
51
|
-
1. **sRGB → linear RGB** — gamma correction using the sRGB companding curve
|
|
52
|
-
2. **Linear RGB → CIE XYZ** — D65 illuminant, matrix multiplication
|
|
53
|
-
3. **CIE XYZ → CIELAB** — nonlinear transform; distances in Lab approximate human perception
|
|
54
|
-
|
|
55
|
-
Why CIELAB? In RGB, a "distance" of 30 between two colors might look identical to one eye and drastically different to another. In CIELAB, Δ*E* distances are perceptually uniform — a Δ*E* of 2 is the threshold for "just noticeable different" regardless of which axis moves.
|
|
56
|
-
|
|
57
|
-
### Stage 4 — K-Means Clustering
|
|
58
|
-
|
|
59
|
-
**K-Means++** initialization places initial centroids spread across the color space (reducing "bad seed" failures). The algorithm:
|
|
60
|
-
|
|
61
|
-
1. Pick one random pixel as centroid 1
|
|
62
|
-
2. For centroids 2..k, pick a pixel with probability proportional to D(x)² (squared distance to nearest existing centroid)
|
|
63
|
-
3. Iterate: assign each pixel to its nearest centroid, recompute centroid as mean of assigned pixels
|
|
64
|
-
4. Stop when assignments stabilize or max iterations reached
|
|
65
|
-
|
|
66
|
-
We run the algorithm 3 times with different seeds and keep the clustering with lowest inertia (sum of squared distances from each pixel to its centroid). This avoids local minima without the cost of more runs.
|
|
67
|
-
|
|
68
|
-
### Stage 5 — ANSI Hue Mapping
|
|
69
|
-
|
|
70
|
-
The 6 chromatic ANSI slots (red, green, yellow, blue, magenta, cyan) are assigned target hue angles:
|
|
71
|
-
|
|
72
|
-
| ANSI Slot | Target Hue (degrees) |
|
|
73
|
-
|:---|---:|
|
|
74
|
-
| red | 30 |
|
|
75
|
-
| yellow | 95 |
|
|
76
|
-
| green | 145 |
|
|
77
|
-
| cyan | 210 |
|
|
78
|
-
| blue | 275 |
|
|
79
|
-
| magenta | 330 |
|
|
80
|
-
|
|
81
|
-
For each slot, the engine picks the most chromatic cluster whose hue is nearest to the target. If no cluster is close enough, the color is synthesized by projecting the accent chroma onto the target hue angle.
|
|
82
|
-
|
|
83
|
-
Structural slots (`c0`/black, `c7`/white, `c8`, `c15`) are computed from the background Lab with fixed lightness offsets — they exist to provide the required contrast ratios, not to carry hue information.
|
|
84
|
-
|
|
85
|
-
### Stage 6 — WCAG AAA Contrast Enforcement
|
|
86
|
-
|
|
87
|
-
Every color pair is checked and adjusted:
|
|
88
|
-
|
|
89
|
-
| Pair | Minimum Ratio |
|
|
90
|
-
|:---|---:|
|
|
91
|
-
| `fg` / `bg` | 7:1 |
|
|
92
|
-
| `accent_text` / `accent` | 7:1 |
|
|
93
|
-
| `c15` / `bg` | 7:1 |
|
|
94
|
-
| `fg` / `sel_bg` | 4.5:1 |
|
|
95
|
-
| `c8` / `bg` | 2.5:1 |
|
|
96
|
-
| `c0` / `bg` | 1.5:1 |
|
|
97
|
-
| `panel` / `bg` | 1.03-2.0 (bounded) |
|
|
98
|
-
| `border` / `bg` | 1.08-3.5 (bounded) |
|
|
99
|
-
|
|
100
|
-
For the accent, the engine darkens in Lab space until white text has 7:1 contrast. For fg and bright ANSI colors, lightness is adjusted until the target ratio is met. The output is guaranteed AAA on launch — the `test_themes_toml.sh` unit test verifies this for every generated theme.
|
|
101
|
-
|
|
102
|
-
## Wallpaper Discovery
|
|
103
|
-
|
|
104
|
-
`rebuild-themes.sh` scans two tiers of wallpapers:
|
|
105
|
-
|
|
106
|
-
### System Wallpapers
|
|
107
|
-
|
|
108
|
-
- **macOS** — `/System/Library/Desktop Pictures/*.heic` and `/System/Library/Desktop Pictures/.thumbnails/*.heic`
|
|
109
|
-
- **Linux** — `/usr/share/backgrounds/` and `/usr/share/wallpapers/` (recursive)
|
|
110
|
-
|
|
111
|
-
### Custom Wallpapers
|
|
112
|
-
|
|
113
|
-
- `~/Pictures/Wallpapers/*.{heic,jpg,png}` (or `$DOTFILES_WALLPAPER_DIR`)
|
|
114
|
-
|
|
115
|
-
### Deduplication
|
|
116
|
-
|
|
117
|
-
Custom wallpapers override system wallpapers on name collision. For Apple's dynamic HEIC files that contain multiple appearances in one file, the engine extracts each frame (`file.heic[0]`, `file.heic[1]`) and generates one theme per appearance.
|
|
118
|
-
|
|
119
|
-
If a base wallpaper has explicit `-dark` and `-light` variants (e.g. `Big Sur Graphic.heic` + `Big Sur Graphic Dark.heic` + `Big Sur Graphic Light.heic`), the base is skipped to avoid duplicate theme names.
|
|
120
|
-
|
|
121
|
-
## Dynamic HEIC (Apple Appearance Metadata)
|
|
122
|
-
|
|
123
|
-
macOS dynamic wallpapers embed the `apple_desktop:apr` XMP metadata — a base64-encoded plist mapping image indices to appearance modes:
|
|
124
|
-
|
|
125
|
-
```xml
|
|
126
|
-
<rdf:Description rdf:about=""
|
|
127
|
-
xmlns:apple_desktop="http://ns.apple.com/namespace/1.0/"
|
|
128
|
-
apple_desktop:apr="YnBsaXN0MDDSAQIDBFFsUWQQABABCA0PERMAAAAAAAABAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAFQ=="/>
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
Decoded:
|
|
132
|
-
|
|
133
|
-
```xml
|
|
134
|
-
<dict>
|
|
135
|
-
<key>l</key><integer>0</integer> <!-- light = image 0 -->
|
|
136
|
-
<key>d</key><integer>1</integer> <!-- dark = image 1 -->
|
|
137
|
-
</dict>
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
`scripts/theme/merge-wallpaper.sh` combines separate dark+light files into a single dynamic HEIC with this metadata:
|
|
141
|
-
|
|
142
|
-
```sh
|
|
143
|
-
bash scripts/theme/merge-wallpaper.sh # merge all pairs
|
|
144
|
-
bash scripts/theme/merge-wallpaper.sh tahoe # merge a specific family
|
|
145
|
-
bash scripts/theme/merge-wallpaper.sh --dry-run # preview
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
macOS then auto-switches the displayed image based on the current Light/Dark mode — no application-level logic required.
|
|
149
|
-
|
|
150
|
-
## Caching
|
|
151
|
-
|
|
152
|
-
Per-wallpaper themes are cached in `~/.cache/dotfiles/themes/<name>.toml`. The cache is invalidated when the wallpaper's mtime is newer than the cached TOML. `dot theme rebuild --force` skips the cache.
|
|
153
|
-
|
|
154
|
-
Full parallel rebuild of ~150 wallpapers takes ~3-5 minutes on modern hardware (4 parallel jobs, ~4 seconds per wallpaper). Incremental rebuilds (after adding 1-2 new wallpapers) take ~10 seconds.
|
|
155
|
-
|
|
156
|
-
## Theme Application
|
|
157
|
-
|
|
158
|
-
`dot-theme-sync` orchestrates the switch across every managed surface:
|
|
159
|
-
|
|
160
|
-
| Surface | Mechanism |
|
|
161
|
-
|:---|:---|
|
|
162
|
-
| Ghostty | `chezmoi apply config.tmpl` + DBus reload or SIGUSR2 |
|
|
163
|
-
| Alacritty | `chezmoi apply alacritty.toml.tmpl` |
|
|
164
|
-
| Kitty | `chezmoi apply kitty.conf.tmpl` + SIGUSR1 |
|
|
165
|
-
| WezTerm | `chezmoi apply wezterm.lua.tmpl` |
|
|
166
|
-
| Tmux | `chezmoi apply tmux.conf.tmpl` + `source-file` |
|
|
167
|
-
| Neovim | `chezmoi apply` + `--remote-expr` colorscheme switch over socket |
|
|
168
|
-
| VS Code | `chezmoi apply settings.json.tmpl` |
|
|
169
|
-
| GTK | `chezmoi apply gtk.css.tmpl` + `gsettings set gtk-theme` |
|
|
170
|
-
| macOS accent | `defaults write -g AppleAccentColor` + `killall cfprefsd SystemUIServer Dock` |
|
|
171
|
-
| Desktop wallpaper | `osascript` (macOS) or `gsettings picture-uri` (Linux) |
|
|
172
|
-
|
|
173
|
-
See [Theming Reference](../03-reference/01-dot-cli.md#theme) for the exact command surface.
|
|
174
|
-
|
|
175
|
-
## Bibliography
|
|
176
|
-
|
|
177
|
-
- MacQueen, J. (1967). *Some methods for classification and analysis of multivariate observations.* Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability.
|
|
178
|
-
- Arthur, D. & Vassilvitskii, S. (2007). *K-Means++: The advantages of careful seeding.* ACM-SIAM Symposium on Discrete Algorithms.
|
|
179
|
-
- CIE (1976). *Recommendations on uniform color spaces, color-difference equations, psychometric color terms.* Supplement No. 2 to CIE Publication No. 15.
|
|
180
|
-
- W3C (2023). *Web Content Accessibility Guidelines (WCAG) 2.2.* <https://www.w3.org/TR/WCAG22/>
|
|
181
|
-
|
|
182
|
-
## See Also
|
|
183
|
-
|
|
184
|
-
- [Theming Guide](../../guides/THEMING.md) — quick-start and troubleshooting
|
|
185
|
-
- [Theme Reference](../../reference/THEMES.md) — data schema and runtime behaviour
|
|
186
|
-
- [Tutorial: Add a Wallpaper](../02-tutorials/02-add-wallpaper.md)
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
{% raw %}
|
|
5
|
-
|
|
6
|
-
# Fleet Architecture
|
|
7
|
-
|
|
8
|
-
A "fleet" is two or more workstations sharing a single `.dotfiles` source repository. The fleet model handles per-host customization, drift detection, and cross-host trust propagation.
|
|
9
|
-
|
|
10
|
-
## Single Source, Many Hosts
|
|
11
|
-
|
|
12
|
-
All hosts clone the same repository. Platform and per-host differences are resolved at `chezmoi apply` time using three sources of data:
|
|
13
|
-
|
|
14
|
-
1. **`.chezmoidata.toml`** — defaults for all hosts
|
|
15
|
-
2. **`.chezmoidata/hardware.toml`** — machine presets (MacBook T2, Surface Pro, Geekom, etc.)
|
|
16
|
-
3. **`~/.config/chezmoi/chezmoi.toml`** — per-host overrides, generated by `chezmoi init`
|
|
17
|
-
|
|
18
|
-
The `machine` key in `chezmoi.toml` selects which preset applies:
|
|
19
|
-
|
|
20
|
-
```toml
|
|
21
|
-
# ~/.config/chezmoi/chezmoi.toml on a MacBook
|
|
22
|
-
[data]
|
|
23
|
-
machine = "macbook-t2"
|
|
24
|
-
theme = "tahoe-dark"
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Templates read `.chezmoi.hardware` to get the resolved preset:
|
|
28
|
-
|
|
29
|
-
```go
|
|
30
|
-
{{- $hw := index .hardware .machine }}
|
|
31
|
-
display_scale = {{ $hw.display_scale }} // 2.0 for MacBook, 1.5 for Surface
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Hardware Presets
|
|
35
|
-
|
|
36
|
-
`.chezmoidata/hardware.toml` ships with ~12 presets covering common laptop/desktop/NUC configurations. Each preset defines:
|
|
37
|
-
|
|
38
|
-
| Field | Purpose |
|
|
39
|
-
|:---|:---|
|
|
40
|
-
| `display_scale` | 1.0, 1.25, 1.5, 1.75, 2.0 |
|
|
41
|
-
| `kbd_layout` | colemak-dh, qwerty, dvorak |
|
|
42
|
-
| `modifier_mode` | left-cmd-control, fn-swap, standard |
|
|
43
|
-
| `perf_profile` | laptop, desktop, low-power |
|
|
44
|
-
| `wm` | aerospace, niri, gnome, kde |
|
|
45
|
-
| `features.X` | per-preset feature toggles |
|
|
46
|
-
|
|
47
|
-
Add a new preset by appending to `hardware.toml` — no code changes needed.
|
|
48
|
-
|
|
49
|
-
## Drift Detection
|
|
50
|
-
|
|
51
|
-
`dot drift` compares the current machine state against the rendered template output and reports:
|
|
52
|
-
|
|
53
|
-
| Drift Type | Example |
|
|
54
|
-
|:---|:---|
|
|
55
|
-
| **Added** | File exists locally but not in source |
|
|
56
|
-
| **Removed** | Source deletes a file still present locally |
|
|
57
|
-
| **Modified** | Local edit to a managed file |
|
|
58
|
-
| **Permission** | Chmod/chown changes |
|
|
59
|
-
| **Symlink target** | Link retargeted |
|
|
60
|
-
|
|
61
|
-
Drift is normal during development. `dot heal` reconciles the source → local direction. `dot apply` overwrites drift; `dot diff` previews the change without applying.
|
|
62
|
-
|
|
63
|
-
## Fleet Attestation
|
|
64
|
-
|
|
65
|
-
`dot fleet attest` runs `dot attest` locally and collects signed attestations from every known host (via SSH). The combined report shows:
|
|
66
|
-
|
|
67
|
-
- Whether all hosts are on the same Git SHA
|
|
68
|
-
- Whether policy hashes match
|
|
69
|
-
- Which hosts have drift
|
|
70
|
-
- Which hosts have verified signatures
|
|
71
|
-
|
|
72
|
-
A typical output:
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
Fleet Attestation — v0.2.501
|
|
76
|
-
|
|
77
|
-
Host Git SHA Policy Tools OK Drift Verified
|
|
78
|
-
-------------- ---------- --------- ---------- ------- --------
|
|
79
|
-
macbook-t2 abc123d 0x7f2a… ✓ 0 ✓
|
|
80
|
-
surface-pro abc123d 0x7f2a… ✓ 2 ✓
|
|
81
|
-
geekom-a9 def456e 0x7f2a… ✗ (chezmoi 2.45) ✗
|
|
82
|
-
-------------- ---------- --------- ---------- ------- --------
|
|
83
|
-
FLEET STATUS: 2/3 aligned; drift on geekom-a9
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
This becomes an auditable artifact — useful for compliance reporting, incident response, and post-upgrade validation.
|
|
87
|
-
|
|
88
|
-
## Fleet Deployment Workflow
|
|
89
|
-
|
|
90
|
-
Recommended rollout procedure for fleet-wide changes:
|
|
91
|
-
|
|
92
|
-
1. **Develop on one host** — make the change, test locally with `dot apply --dry-run` then `dot apply`
|
|
93
|
-
2. **Open a PR** — CI validates shellcheck, tests, security scanners
|
|
94
|
-
3. **Merge to main** — signed commit required
|
|
95
|
-
4. **Per-host pull** — on each fleet host: `dot update` (git pull + apply)
|
|
96
|
-
5. **Verify alignment** — run `dot fleet attest` from any host
|
|
97
|
-
|
|
98
|
-
For urgent rollback: every host can independently run `dot rollback` to return to the previous known-good state (stored in `~/.local/state/dotfiles/snapshots/`).
|
|
99
|
-
|
|
100
|
-
## Cross-Host Trust
|
|
101
|
-
|
|
102
|
-
Each host has its own SSH ED25519 signing key. To establish mutual trust:
|
|
103
|
-
|
|
104
|
-
1. On each host: `cat ~/.ssh/id_ed25519.pub` — capture the public key
|
|
105
|
-
2. Add every host's public key to `~/.ssh/allowed_signers` on every other host
|
|
106
|
-
3. Commit `allowed_signers` to the source repository (it's public-key material, safe to share)
|
|
107
|
-
4. After `dot apply`, any host can verify commits and attestations from any other host
|
|
108
|
-
|
|
109
|
-
This creates a **web-of-trust** among your own fleet. No central CA, no external service — just SSH keys.
|
|
110
|
-
|
|
111
|
-
## Machine-Scoped Secrets
|
|
112
|
-
|
|
113
|
-
Some secrets must decrypt only on specific hosts (e.g. a work VPN config that doesn't belong on a personal laptop). The SOPS approach:
|
|
114
|
-
|
|
115
|
-
```yaml
|
|
116
|
-
# dot_config/vpn.sops.yaml
|
|
117
|
-
vpn_key: ENC[AES256_GCM,data:...]
|
|
118
|
-
sops:
|
|
119
|
-
age:
|
|
120
|
-
- recipient: age1... # work laptop only
|
|
121
|
-
enc: |
|
|
122
|
-
-----BEGIN AGE ENCRYPTED FILE-----
|
|
123
|
-
...
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Only the host with the matching Age private key can decrypt. Other hosts see the encrypted file but cannot read the content.
|
|
127
|
-
|
|
128
|
-
## Fleet Operational Commands
|
|
129
|
-
|
|
130
|
-
| Command | Purpose |
|
|
131
|
-
|:---|:---|
|
|
132
|
-
| `dot fleet` | Show all known hosts and their last-seen status |
|
|
133
|
-
| `dot fleet attest` | Collect signed attestations from every host |
|
|
134
|
-
| `dot fleet diff` | Compare rendered config across hosts |
|
|
135
|
-
| `dot fleet sync` | Run `dot update` on every host (requires SSH access) |
|
|
136
|
-
|
|
137
|
-
## Limitations
|
|
138
|
-
|
|
139
|
-
- Fleet commands assume SSH connectivity between hosts (or a dedicated orchestration agent — see [Roadmap](../../operations/ROADMAP.md))
|
|
140
|
-
- Secret rotation requires re-encrypting for all recipients; automated with `dot secrets rotate`
|
|
141
|
-
- There is no central policy store — policy is versioned in the Git repository itself
|
|
142
|
-
|
|
143
|
-
## See Also
|
|
144
|
-
|
|
145
|
-
- [Fleet Deployment Architecture](../../architecture/fleet-deployment.md) — diagrams
|
|
146
|
-
- [Trust Model](02-trust-model.md)
|
|
147
|
-
- [Tutorial: Deploy to a Fleet](../02-tutorials/05-deploy-fleet.md)
|
|
148
|
-
{% endraw %}
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Self-Healing
|
|
6
|
-
|
|
7
|
-
`.dotfiles` detects, diagnoses, and repairs configuration drift, missing tools, broken symlinks, and environmental damage — often without user intervention.
|
|
8
|
-
|
|
9
|
-
## The Self-Healing Loop
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
|
|
13
|
-
│ dot doctor │ ──► │ detect │ ──► │ report │
|
|
14
|
-
└─────────────┘ └─────────────┘ └─────────────┘
|
|
15
|
-
│
|
|
16
|
-
▼
|
|
17
|
-
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
|
|
18
|
-
│ dot heal │ ──► │ repair │ ──► │ verify │
|
|
19
|
-
└─────────────┘ └─────────────┘ └─────────────┘
|
|
20
|
-
│
|
|
21
|
-
▼ (on failure)
|
|
22
|
-
┌─────────────┐ ┌─────────────┐
|
|
23
|
-
│dot rollback │ ──► │ revert │
|
|
24
|
-
└─────────────┘ └─────────────┘
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## `dot doctor` — Detection
|
|
28
|
-
|
|
29
|
-
`dot doctor` runs ~40 health checks grouped into categories:
|
|
30
|
-
|
|
31
|
-
| Category | Checks |
|
|
32
|
-
|:---|:---|
|
|
33
|
-
| **Paths** | `~/.local/bin`, `~/.cargo/bin`, Mise shim order, Homebrew prefix |
|
|
34
|
-
| **Tools** | Required: git, chezmoi. Optional: mise, nix, age, sops, pandoc |
|
|
35
|
-
| **Chezmoi** | Source dir exists, data file valid, no uncommitted drift |
|
|
36
|
-
| **Shell** | Default shell matches profile, startup time <500ms |
|
|
37
|
-
| **Security** | SSH keys present, Age key present, gitleaks baseline |
|
|
38
|
-
| **Portability** | Git user.email set, LC_ALL sane, TERM recognized |
|
|
39
|
-
|
|
40
|
-
Exit codes:
|
|
41
|
-
|
|
42
|
-
| Code | Meaning |
|
|
43
|
-
|:---|:---|
|
|
44
|
-
| 0 | All checks passed |
|
|
45
|
-
| 1 | Warnings (non-blocking) |
|
|
46
|
-
| 2 | Critical failures (tool missing, config broken) |
|
|
47
|
-
|
|
48
|
-
Flags:
|
|
49
|
-
|
|
50
|
-
- `--score` / `-s` — numeric health score (0-100)
|
|
51
|
-
- `--heal` / `-H` — auto-fix detected issues (equivalent to `dot doctor && dot heal`)
|
|
52
|
-
- `--json` / `-j` — machine-readable output for CI/monitoring
|
|
53
|
-
- `--verbose` / `-v` — show every check (default shows only failures)
|
|
54
|
-
|
|
55
|
-
## `dot heal` — Repair
|
|
56
|
-
|
|
57
|
-
`dot heal` addresses three common failure modes:
|
|
58
|
-
|
|
59
|
-
### 1. Missing Tools
|
|
60
|
-
|
|
61
|
-
Reinstalls tools listed in `.chezmoidata.toml` that aren't on PATH:
|
|
62
|
-
|
|
63
|
-
```sh
|
|
64
|
-
dot heal
|
|
65
|
-
# [heal] jq not found, installing via mise
|
|
66
|
-
# [heal] age not found, installing via homebrew
|
|
67
|
-
# [heal] ✓ 2 tools installed
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Priority order: mise → homebrew (macOS) → apt/dnf (Linux) → nix → manual install script.
|
|
71
|
-
|
|
72
|
-
### 2. Chezmoi Drift
|
|
73
|
-
|
|
74
|
-
Runs `chezmoi apply --force` to reconcile local files back to the source state. Skipped files (excluded via `.chezmoiignore`) are left alone.
|
|
75
|
-
|
|
76
|
-
### 3. Broken Symlinks & Missing Files
|
|
77
|
-
|
|
78
|
-
Detects dangling symlinks (target doesn't exist) and re-applies chezmoi to recreate them. Missing critical files (e.g. `~/.zshrc`) trigger a targeted re-render.
|
|
79
|
-
|
|
80
|
-
### Flags
|
|
81
|
-
|
|
82
|
-
- `--dry-run` / `-n` — show what would be fixed, don't change anything
|
|
83
|
-
- `--force` / `-f` — skip confirmation prompts
|
|
84
|
-
- `--tool <name>` — heal only a specific tool
|
|
85
|
-
|
|
86
|
-
### Exit Codes
|
|
87
|
-
|
|
88
|
-
- 0 — nothing to heal or all fixes succeeded
|
|
89
|
-
- 1 — some repairs failed, manual intervention required
|
|
90
|
-
|
|
91
|
-
## `dot chaos` — Self-Test
|
|
92
|
-
|
|
93
|
-
`dot chaos` intentionally corrupts the local installation to verify `dot heal` can recover it. This is **destructive** — run only in ephemeral environments (containers, VMs, fresh installs).
|
|
94
|
-
|
|
95
|
-
Corruption scenarios:
|
|
96
|
-
|
|
97
|
-
| Scenario | What it breaks |
|
|
98
|
-
|:---|:---|
|
|
99
|
-
| `symlink` | Delete 3 random managed symlinks |
|
|
100
|
-
| `config` | Rewrite `~/.gitconfig` with garbage |
|
|
101
|
-
| `tool` | `mv` a critical binary out of PATH |
|
|
102
|
-
| `permission` | `chmod 000` on a dotfile |
|
|
103
|
-
| `all` | Run all scenarios sequentially |
|
|
104
|
-
|
|
105
|
-
Typical workflow:
|
|
106
|
-
|
|
107
|
-
```sh
|
|
108
|
-
docker run --rm -it ubuntu bash
|
|
109
|
-
# inside container:
|
|
110
|
-
bash -c "$(curl -fsSL https://.../install.sh)"
|
|
111
|
-
dot doctor # baseline
|
|
112
|
-
dot chaos all # break things
|
|
113
|
-
dot heal # fix
|
|
114
|
-
dot doctor # verify
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
This is part of CI: every PR runs `dot chaos` in a Docker container and validates `dot heal` restores a healthy state.
|
|
118
|
-
|
|
119
|
-
## `dot rollback` — Revert
|
|
120
|
-
|
|
121
|
-
Before every `dot apply`, chezmoi writes a snapshot to `~/.local/state/dotfiles/snapshots/YYYY-MM-DD-HHMMSS/`. `dot rollback` restores the most recent snapshot:
|
|
122
|
-
|
|
123
|
-
```sh
|
|
124
|
-
dot rollback # revert to the most recent snapshot
|
|
125
|
-
dot rollback status # list available snapshots
|
|
126
|
-
dot rollback restore 3 # restore snapshot #3
|
|
127
|
-
dot rollback clean # delete snapshots older than 30 days
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
Snapshots include:
|
|
131
|
-
|
|
132
|
-
- Every file chezmoi would have overwritten
|
|
133
|
-
- The previous `.chezmoidata.toml` and `chezmoi.toml`
|
|
134
|
-
- A pointer to the Git SHA at apply time
|
|
135
|
-
|
|
136
|
-
They do **not** include:
|
|
137
|
-
|
|
138
|
-
- Generated caches (`~/.cache/`)
|
|
139
|
-
- Tool binaries (Mise-managed)
|
|
140
|
-
- External state (databases, remote repos)
|
|
141
|
-
|
|
142
|
-
## `dot bundle` — Offline Recovery
|
|
143
|
-
|
|
144
|
-
`dot bundle` creates a self-contained archive that can restore the workstation without network access:
|
|
145
|
-
|
|
146
|
-
```
|
|
147
|
-
dotfiles-bundle-v0.2.501-20260416.tar.zst
|
|
148
|
-
├── source/ # Full git clone at current HEAD
|
|
149
|
-
├── tools/ # Pre-built chezmoi binary + mise
|
|
150
|
-
├── secrets/ # Age-encrypted snapshot of ~/.config/age/
|
|
151
|
-
├── manual/ # Offline manual (HTML + PDF)
|
|
152
|
-
├── attestation.json # Signed state
|
|
153
|
-
├── install-offline.sh # Bootstrap script
|
|
154
|
-
└── SHA256SUMS # Integrity checksums
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
Usage:
|
|
158
|
-
|
|
159
|
-
```sh
|
|
160
|
-
dot bundle # create bundle in ~/Downloads/
|
|
161
|
-
dot bundle --to /path/to/usb.img # write to external storage
|
|
162
|
-
dot bundle restore bundle.tar.zst # restore from bundle
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
Recovery use case: you're stranded on a new machine with no internet. Copy the bundle over (USB, phone tether, Bluetooth). Run `bash install-offline.sh`. You have a working dotfiles environment in <60 seconds, no network required.
|
|
166
|
-
|
|
167
|
-
## Observability
|
|
168
|
-
|
|
169
|
-
### Health Score
|
|
170
|
-
|
|
171
|
-
`dot score` returns a 0-100 score combining:
|
|
172
|
-
|
|
173
|
-
| Dimension | Weight |
|
|
174
|
-
|:---|---:|
|
|
175
|
-
| Tool availability | 30 |
|
|
176
|
-
| Chezmoi drift | 20 |
|
|
177
|
-
| Security gates (sigs, secrets, Age key) | 20 |
|
|
178
|
-
| Performance (shell startup, cache health) | 15 |
|
|
179
|
-
| Compliance (policy hash match) | 15 |
|
|
180
|
-
|
|
181
|
-
Scores:
|
|
182
|
-
|
|
183
|
-
- 90-100 — healthy
|
|
184
|
-
- 70-89 — minor issues
|
|
185
|
-
- 50-69 — needs attention
|
|
186
|
-
- <50 — run `dot heal` immediately
|
|
187
|
-
|
|
188
|
-
### Metrics
|
|
189
|
-
|
|
190
|
-
`dot metrics` shows recent observations: shell startup time, last-apply duration, heal events, chaos self-tests, CVE counts from SBOM scan. Metrics are stored locally in `~/.local/state/dotfiles/metrics.jsonl` (append-only, one line per event).
|
|
191
|
-
|
|
192
|
-
## Design Principles
|
|
193
|
-
|
|
194
|
-
1. **Idempotent** — running `dot apply` or `dot heal` twice has the same effect as once
|
|
195
|
-
2. **Reversible** — every mutation creates a rollback point
|
|
196
|
-
3. **Observable** — failures produce actionable error messages with exit codes
|
|
197
|
-
4. **Offline-capable** — core flows (detect, heal, rollback) work without network
|
|
198
|
-
5. **Minimally invasive** — repairs are scoped to the smallest unit that fixes the problem
|
|
199
|
-
|
|
200
|
-
## See Also
|
|
201
|
-
|
|
202
|
-
- [Reliability Operations](../../operations/RELIABILITY.md)
|
|
203
|
-
- [Tutorial: First Install](../02-tutorials/01-first-install.md)
|
|
204
|
-
- [Cookbook: Troubleshooting](../04-cookbook/02-troubleshooting.md)
|