@sebastienrousseau/dotfiles 0.2.520 → 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 +18 -0
- package/LICENSE-APACHE +190 -0
- package/LICENSE-MIT +21 -0
- package/README.md +43 -37
- package/install.sh +76 -10
- package/package.json +7 -7
- 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/ARCHITECTURE.md +0 -117
- package/docs/CNAME +0 -1
- package/docs/CONFIG_STRATEGY.md +0 -124
- package/docs/COPYRIGHT +0 -7
- package/docs/ECOSYSTEM.md +0 -220
- package/docs/GOLD-STANDARD-AUDIT.md +0 -352
- package/docs/GOVERNANCE.md +0 -98
- package/docs/MAINTAINERS.md +0 -41
- package/docs/MINIMUM-TOOLCHAIN.md +0 -100
- 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 -20
- 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/MACOS_ICLOUD_SYMLINKS.md +0 -121
- 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 -475
- 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 -175
- package/docs/manual/concept-index.md +0 -170
- package/docs/manual/index.md +0 -66
- package/docs/migration/README.md +0 -81
- package/docs/migration/from-bare-git-repo.md +0 -156
- package/docs/migration/from-gnu-stow.md +0 -165
- package/docs/migration/from-plain-chezmoi.md +0 -148
- package/docs/migration/from-yadm.md +0 -187
- 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/PERFORMANCE_BUDGETS.md +0 -196
- 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 -44
- package/docs/operations/TRUSTED_AGENT_WORKSTATION.md +0 -65
- package/docs/operations/VERSION_SYNC.md +0 -393
- package/docs/packaging.md +0 -222
- 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/FEATURE-MATRIX.md +0 -646
- 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 -243
- 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 -209
- 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 -165
- package/scripts/diagnostics/aliases-cheatsheet.sh +0 -74
- package/scripts/diagnostics/aliases-manifest.sh +0 -77
- package/scripts/diagnostics/attest-verify.sh +0 -147
- package/scripts/diagnostics/benchmark.sh +0 -408
- package/scripts/diagnostics/conflicts.sh +0 -73
- package/scripts/diagnostics/doctor-unified.sh +0 -43
- package/scripts/diagnostics/doctor.sh +0 -797
- package/scripts/diagnostics/drift-dashboard.sh +0 -203
- package/scripts/diagnostics/health.sh +0 -656
- 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 -120
- 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 -212
- package/scripts/dot/commands/agent.sh +0 -535
- package/scripts/dot/commands/agents.sh +0 -352
- package/scripts/dot/commands/ai.sh +0 -600
- package/scripts/dot/commands/aliases.sh +0 -277
- package/scripts/dot/commands/appearance.sh +0 -110
- package/scripts/dot/commands/completion.sh +0 -171
- 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 -711
- 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 -438
- package/scripts/dot/commands/patterns.sh +0 -55
- package/scripts/dot/commands/registry.sh +0 -455
- 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 -570
- 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 -200
- package/scripts/nvim/headless-upgrade.lua +0 -81
- 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 -67
- 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 -613
- package/scripts/ops/setup.sh +0 -138
- package/scripts/ops/teleport.sh +0 -34
- package/scripts/qa/check-feature-matrix.sh +0 -296
- package/scripts/qa/check-version-consistency.sh +0 -12
- package/scripts/qa/coverage-baseline.sh +0 -61
- package/scripts/qa/docs-coverage.sh +0 -118
- 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 -124
- package/scripts/qa/validate-examples.sh +0 -90
- 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 -552
- 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 -1020
- 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 -603
- package/scripts/theme/switch.sh +0 -476
- 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/verify-release-versions +0 -156
- package/scripts/version-sync.sh +0 -714
- 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,187 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
<!-- SPDX-License-Identifier: Apache-2.0 OR MIT -->
|
|
6
|
-
<!-- Copyright (c) 2015-2026 Sebastien Rousseau -->
|
|
7
|
-
|
|
8
|
-
# Migrating from yadm
|
|
9
|
-
|
|
10
|
-
yadm is the closest neighbour: both track real files in `$HOME` with
|
|
11
|
-
git, both template per host, both encrypt secrets. The migration is
|
|
12
|
-
mostly a mechanical re-home of files plus a translation of yadm's
|
|
13
|
-
alternate-file suffixes into chezmoi templates.
|
|
14
|
-
|
|
15
|
-
## Concept mapping
|
|
16
|
-
|
|
17
|
-
| yadm | Here | Note |
|
|
18
|
-
|---|---|---|
|
|
19
|
-
| `yadm add` / `yadm commit` | `dot add` then a normal `git commit` in the source dir | Source tree is a plain git repo |
|
|
20
|
-
| `$HOME` **is** the work tree | Files live in `defaults/` and are *rendered* into `$HOME` | The big conceptual change |
|
|
21
|
-
| `##os.Linux`, `##hostname.foo` suffixes | `{{ if eq .chezmoi.os "linux" }}` in a `.tmpl` | One file with branches, not N files |
|
|
22
|
-
| `yadm alt` | `chezmoi apply` | Automatic; no separate step |
|
|
23
|
-
| `yadm encrypt` (GPG) | `dot secrets` (age + sops) | Different crypto; see below |
|
|
24
|
-
| `yadm bootstrap` | `install/provision/run_onchange_*` | Runs on apply, idempotent |
|
|
25
|
-
| `yadm status` / `diff` | `dot status` / `dot diff` | Same intent |
|
|
26
|
-
|
|
27
|
-
## 1. Inventory and back up
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
yadm list -a > ~/yadm-inventory.txt
|
|
31
|
-
wc -l ~/yadm-inventory.txt
|
|
32
|
-
tar -czf ~/yadm-backup-$(date +%F).tar.gz -C "$HOME" -T ~/yadm-inventory.txt
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Keep `yadm-inventory.txt`: it is your checklist, and step 5 diffs
|
|
36
|
-
against it.
|
|
37
|
-
|
|
38
|
-
## 2. Install alongside yadm
|
|
39
|
-
|
|
40
|
-
The installer does not touch yadm's repo (`~/.local/share/yadm/repo.git`)
|
|
41
|
-
or its config, so both can coexist while you migrate.
|
|
42
|
-
|
|
43
|
-
```sh
|
|
44
|
-
bash -c "$(curl -fsSL https://raw.githubusercontent.com/sebastienrousseau/dotfiles/main/install.sh)"
|
|
45
|
-
dot version
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
If you want to bring your *own* dotfiles repo rather than the
|
|
49
|
-
maintainer's defaults, use `dot init` instead:
|
|
50
|
-
|
|
51
|
-
```sh
|
|
52
|
-
dot init yourusername --dry-run # prints the resolved URL and target dir
|
|
53
|
-
dot init yourusername
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## 3. Move files across
|
|
57
|
-
|
|
58
|
-
Plain (non-alternate) files first:
|
|
59
|
-
|
|
60
|
-
```sh
|
|
61
|
-
while read -r f; do
|
|
62
|
-
case "$f" in
|
|
63
|
-
*##*) continue ;; # alternates handled in step 4
|
|
64
|
-
esac
|
|
65
|
-
dot add "$f"
|
|
66
|
-
done < ~/yadm-inventory.txt
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
`dot add` wraps `chezmoi add`, so a file in `~/.config/foo/bar` lands
|
|
70
|
-
at `defaults/dot_config/foo/bar`, and `~/.gitconfig` at
|
|
71
|
-
`defaults/dot_gitconfig`.
|
|
72
|
-
|
|
73
|
-
## 4. Translate alternates into templates
|
|
74
|
-
|
|
75
|
-
For each `##`-suffixed file, replace the family with one `.tmpl`.
|
|
76
|
-
|
|
77
|
-
yadm:
|
|
78
|
-
|
|
79
|
-
```text
|
|
80
|
-
~/.gitconfig##os.Darwin
|
|
81
|
-
~/.gitconfig##os.Linux
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Here — `defaults/dot_gitconfig.tmpl`:
|
|
85
|
-
|
|
86
|
-
```text
|
|
87
|
-
[user]
|
|
88
|
-
name = {{ .name }}
|
|
89
|
-
email = {{ .email }}
|
|
90
|
-
{{ if eq .chezmoi.os "darwin" }}
|
|
91
|
-
[credential]
|
|
92
|
-
helper = osxkeychain
|
|
93
|
-
{{ else if eq .chezmoi.os "linux" }}
|
|
94
|
-
[credential]
|
|
95
|
-
helper = cache --timeout=3600
|
|
96
|
-
{{ end }}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
The common yadm conditions map as:
|
|
100
|
-
|
|
101
|
-
| yadm suffix | chezmoi expression |
|
|
102
|
-
|---|---|
|
|
103
|
-
| `##os.Darwin` | `eq .chezmoi.os "darwin"` |
|
|
104
|
-
| `##os.Linux` | `eq .chezmoi.os "linux"` |
|
|
105
|
-
| `##hostname.foo` | `eq .chezmoi.hostname "foo"` |
|
|
106
|
-
| `##user.alice` | `eq .chezmoi.username "alice"` |
|
|
107
|
-
| `##distro.Ubuntu` | `eq .chezmoi.osRelease.id "ubuntu"` |
|
|
108
|
-
| `##default` | the `{{ else }}` branch |
|
|
109
|
-
|
|
110
|
-
Verify before applying — templates fail loudly, but only when rendered:
|
|
111
|
-
|
|
112
|
-
```sh
|
|
113
|
-
chezmoi execute-template < defaults/dot_gitconfig.tmpl
|
|
114
|
-
dot diff
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
## 5. Migrate encrypted files
|
|
118
|
-
|
|
119
|
-
yadm uses GPG; this framework uses age via sops. There is no automatic
|
|
120
|
-
converter, and that is deliberate — re-encrypting secrets is a step
|
|
121
|
-
you should perform consciously.
|
|
122
|
-
|
|
123
|
-
```sh
|
|
124
|
-
# Decrypt with yadm, in a directory that is not the repo.
|
|
125
|
-
mkdir -p /tmp/secrets-migration && cd /tmp/secrets-migration
|
|
126
|
-
yadm decrypt
|
|
127
|
-
|
|
128
|
-
# Set up age and re-encrypt.
|
|
129
|
-
dot secrets-init # generates the age key
|
|
130
|
-
dot secrets-create # creates the encrypted store
|
|
131
|
-
dot secrets set GITHUB_TOKEN # one per secret, prompts for the value
|
|
132
|
-
dot secrets list
|
|
133
|
-
|
|
134
|
-
cd - && rm -rf /tmp/secrets-migration
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Details and the provider model: [`../security/SECRETS.md`](../security/SECRETS.md).
|
|
138
|
-
|
|
139
|
-
## 6. Apply and verify
|
|
140
|
-
|
|
141
|
-
```sh
|
|
142
|
-
dot diff # review every pending change
|
|
143
|
-
dot sync # apply
|
|
144
|
-
dot doctor # health check
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
Then diff against the inventory to catch anything missed:
|
|
148
|
-
|
|
149
|
-
```sh
|
|
150
|
-
while read -r f; do
|
|
151
|
-
[ -e "$HOME/$f" ] || echo "MISSING: $f"
|
|
152
|
-
done < ~/yadm-inventory.txt
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
## 7. Retire yadm
|
|
156
|
-
|
|
157
|
-
Only after a full working day on the new setup:
|
|
158
|
-
|
|
159
|
-
```sh
|
|
160
|
-
yadm list -a > ~/yadm-final-check.txt # last snapshot, keep it
|
|
161
|
-
rm -rf ~/.local/share/yadm
|
|
162
|
-
rm -rf ~/.config/yadm
|
|
163
|
-
# and remove the yadm package via your package manager
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
## Rolling back
|
|
167
|
-
|
|
168
|
-
At any point before step 7, yadm is untouched:
|
|
169
|
-
|
|
170
|
-
```sh
|
|
171
|
-
bash ~/.dotfiles/scripts/uninstall.sh --force
|
|
172
|
-
tar -xzf ~/yadm-backup-<date>.tar.gz -C "$HOME"
|
|
173
|
-
yadm status
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
## What you gain, what you lose
|
|
177
|
-
|
|
178
|
-
**Gain:** one templated file instead of alternate families; the `dot`
|
|
179
|
-
CLI (`doctor`, `health`, `heal`, `rollback`, `attest`); multi-shell
|
|
180
|
-
parity including fish, nushell and PowerShell; signed and attested
|
|
181
|
-
releases; fleet commands for more than one machine.
|
|
182
|
-
|
|
183
|
-
**Lose:** `$HOME` is no longer a git work tree, so `git status` in your
|
|
184
|
-
home directory stops being meaningful — you use `dot status` instead.
|
|
185
|
-
GPG-encrypted files become age/sops. yadm is a single ~2k-line script;
|
|
186
|
-
this is a larger surface. And yadm's bootstrap is one file, whereas
|
|
187
|
-
provisioning here is spread across `install/provision/`.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Architecture Roadmap
|
|
2
|
-
|
|
3
|
-
Historical architecture planning has been consolidated into the canonical
|
|
4
|
-
[`../../ROADMAP.md`](../../ROADMAP.md).
|
|
5
|
-
|
|
6
|
-
Current architecture decisions belong in `docs/architecture/`; future roadmap
|
|
7
|
-
items belong in the root roadmap or in GitHub issues and milestones.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Workstation Attestation
|
|
6
|
-
|
|
7
|
-
`dot attest` exports a machine-readable record of the current workstation state.
|
|
8
|
-
|
|
9
|
-
It captures:
|
|
10
|
-
|
|
11
|
-
- dotfiles version
|
|
12
|
-
- platform and architecture
|
|
13
|
-
- Git signing settings
|
|
14
|
-
- active agent profile
|
|
15
|
-
- MCP strict-mode audit status
|
|
16
|
-
- tracked agent card, profile, and registry data
|
|
17
|
-
- policy bundles
|
|
18
|
-
- model and prompt registries
|
|
19
|
-
|
|
20
|
-
Run:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
dot attest
|
|
24
|
-
dot attest --json
|
|
25
|
-
dot attest -j
|
|
26
|
-
dot attest --write ~/.local/state/dotfiles/attestations/workstation.json
|
|
27
|
-
dot attest -w ~/.local/state/dotfiles/attestations/workstation.json
|
|
28
|
-
dot attest --fleet-store /srv/dotfiles-fleet
|
|
29
|
-
dot attest -F /srv/dotfiles-fleet -I engineering
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
The default output path is `~/.local/state/dotfiles/attestations/workstation-attestation.json`.
|
|
33
|
-
|
|
34
|
-
Fleet export writes:
|
|
35
|
-
|
|
36
|
-
- `<fleet-store>/<fleet-id>/<hostname>/workstation-attestation.json`
|
|
37
|
-
- timestamped copies for retention
|
|
38
|
-
|
|
39
|
-
Governance evidence is embedded directly in the JSON output. That includes:
|
|
40
|
-
|
|
41
|
-
- policy bundle definitions
|
|
42
|
-
- model registry metadata
|
|
43
|
-
- prompt registry metadata
|
|
44
|
-
- tracked MCP policy and registry artifacts
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# CI Cadence
|
|
6
|
-
|
|
7
|
-
This page tabulates every GitHub Actions workflow in `.github/workflows/`
|
|
8
|
-
with its trigger cadence and the rationale for that cadence. Maintained
|
|
9
|
-
under [issue #861](https://github.com/sebastienrousseau/dotfiles/issues/861).
|
|
10
|
-
|
|
11
|
-
## Cadence rules
|
|
12
|
-
|
|
13
|
-
We use four cadence buckets:
|
|
14
|
-
|
|
15
|
-
| Bucket | When | Used for |
|
|
16
|
-
|---|---|---|
|
|
17
|
-
| **Event** | `push`, `pull_request`, `merge_group` | Code-change gates — must run on every PR. |
|
|
18
|
-
| **Weekly** | `schedule:` Monday or Sunday | Drift detection, beta-tool watch, extended platform matrices. |
|
|
19
|
-
| **Monthly** | (none currently) | Long-running audits, historical scans. |
|
|
20
|
-
| **Manual** | `workflow_dispatch` only | Releases, ad-hoc tooling. |
|
|
21
|
-
|
|
22
|
-
**Anti-rule:** no workflow runs on `cron: '* * * *'` (daily) unless its
|
|
23
|
-
output is consumed daily by something downstream. Nothing today meets
|
|
24
|
-
that bar; see "Why no daily jobs" below.
|
|
25
|
-
|
|
26
|
-
## Workflow cadence table
|
|
27
|
-
|
|
28
|
-
| Workflow | Triggers | Schedule (UTC) | Why this cadence |
|
|
29
|
-
|---|---|---|---|
|
|
30
|
-
| `ci.yml` | event + schedule | Mon 06:00 (weekly) | Lint / test on every PR; weekly schedule catches drift from external dependencies (apt mirrors, Homebrew bottles) even when no code lands. |
|
|
31
|
-
| `ci-enforced.yml` | event | — | Strict gates fire on every PR; no scheduled run (covered by ci.yml weekly). |
|
|
32
|
-
| `codeql.yml` | event + schedule | Mon 06:00 (weekly) | Source-code SAST. Weekly schedule catches new CodeQL rule packs. |
|
|
33
|
-
| `compliance-guard.yml` | event | — | Policy enforcement on every PR; no need to schedule. |
|
|
34
|
-
| `cross-platform-test.yml` | event + schedule | Sun 07:00 (weekly) | Validates BSD vs GNU tool divergence on every PR; weekly catches GitHub-hosted-runner image updates. |
|
|
35
|
-
| `devcontainer-prebuild.yml` | event + schedule | Mon 03:00 (weekly) | Pre-build the devcontainer image weekly so first `Open in Codespaces` is fast. |
|
|
36
|
-
| `manual-publish.yml` | manual only | — | Release-trigger flow; never scheduled. |
|
|
37
|
-
| `nightly.yml` | schedule + manual | **Sun 02:00 (weekly)** | Was daily; flipped to weekly under [#861](https://github.com/sebastienrousseau/dotfiles/issues/861). Jobs (beta-tool detection, extended OS matrix on macos-15-intel/macos-14, dependency-report) don't need daily cadence. |
|
|
38
|
-
| `npm-publish.yml` | release tag | — | Trigger: `push` of a version tag. |
|
|
39
|
-
| `policy-bundle-release.yml` | manual + release | — | Manual / release-trigger only. |
|
|
40
|
-
| `pr-signature.yml` | pull_request | — | Verifies PR description has the branding signature. |
|
|
41
|
-
| `reliability-gate.yml` | event | — | Reliability audit on every PR; no scheduled cadence. |
|
|
42
|
-
| `reusable-*.yml` (×7) | callable | — | Called by other workflows; not directly triggered. |
|
|
43
|
-
| `sbom-diff.yml` | pull_request | — | Generates SBOM diff per PR. |
|
|
44
|
-
| `security-enhanced.yml` | event + schedule | **Sun 02:00 (weekly)** | Was daily; reduced to weekly in earlier hardening. Per-PR runs cover the active-change case. |
|
|
45
|
-
| `security-release.yml` | release tag | — | SLSA provenance on release; never scheduled. |
|
|
46
|
-
| `sync-versions.yml` | manual | — | Version-bump tooling. |
|
|
47
|
-
| `update-deps.yml` | schedule | Mon 08:00 (weekly) | Dependabot is the primary path; this is a belt-and-suspenders weekly sweep. |
|
|
48
|
-
|
|
49
|
-
## Why no daily jobs
|
|
50
|
-
|
|
51
|
-
We reviewed every workflow with maintainer Sebastien Rousseau on
|
|
52
|
-
2026-05-12 and concluded:
|
|
53
|
-
|
|
54
|
-
1. **No external signal needs daily polling.** Dependency updates flow
|
|
55
|
-
through Dependabot (push-driven, not poll-driven). Beta-tool
|
|
56
|
-
detection in `nightly.yml` checks for major Chezmoi / ShellCheck
|
|
57
|
-
updates — these ship every few months, not days. CVE scans run on
|
|
58
|
-
every PR (`sbom-diff.yml`) plus a weekly aggregate
|
|
59
|
-
(`security-enhanced.yml`).
|
|
60
|
-
|
|
61
|
-
2. **No downstream consumer reads daily artifacts.** No external
|
|
62
|
-
dashboard, no published feed, no alert ingester depends on a daily
|
|
63
|
-
nightly artifact. The artifacts are inspected ad-hoc.
|
|
64
|
-
|
|
65
|
-
3. **Daily cadence was vestigial.** `nightly.yml` had cron `0 2 * * *`
|
|
66
|
-
from an earlier era when the workflow ran the full test matrix; the
|
|
67
|
-
matrix has since moved into `ci-enforced.yml` (event-driven), but
|
|
68
|
-
the cron was never updated. Confirmed via `git log` of the file.
|
|
69
|
-
|
|
70
|
-
If any of these conditions changes (e.g., we add a publishing pipeline
|
|
71
|
-
that needs daily artifacts), the appropriate path is a new `daily-checks.yml`
|
|
72
|
-
workflow with explicit cadence rationale documented here — *not* flipping
|
|
73
|
-
an existing weekly back to daily.
|
|
74
|
-
|
|
75
|
-
## Cost impact of the daily → weekly flip
|
|
76
|
-
|
|
77
|
-
Before (daily nightly):
|
|
78
|
-
|
|
79
|
-
- 7 runs/week × ~40 min total CI minutes per run = **~280 min/week**
|
|
80
|
-
- ~14,560 minutes/year (~243 hours of CI compute)
|
|
81
|
-
|
|
82
|
-
After (weekly nightly):
|
|
83
|
-
|
|
84
|
-
- 1 run/week × ~40 min = **~40 min/week**
|
|
85
|
-
- ~2,080 minutes/year (~35 hours)
|
|
86
|
-
|
|
87
|
-
**Net saving: ~208 hours of CI compute per year (~85% reduction)** on
|
|
88
|
-
the nightly workflow alone. GitHub-hosted minutes are billed per
|
|
89
|
-
runner-minute; saving aligns with the project's "zero-debt, no waste"
|
|
90
|
-
mandate.
|
|
91
|
-
|
|
92
|
-
## Reviewing this page
|
|
93
|
-
|
|
94
|
-
When adding a new workflow:
|
|
95
|
-
|
|
96
|
-
1. Pick a bucket from the rules at the top of this page.
|
|
97
|
-
2. Add the row to the table — include the **why**, not just the cron
|
|
98
|
-
expression. Future maintainers should be able to decide whether a
|
|
99
|
-
cadence is still load-bearing.
|
|
100
|
-
3. If proposing a daily cadence, justify why a weekly version doesn't
|
|
101
|
-
meet the need in the workflow's PR description.
|
|
102
|
-
|
|
103
|
-
## References
|
|
104
|
-
|
|
105
|
-
- [`nightly.yml`](https://github.com/sebastienrousseau/dotfiles/blob/main/.github/workflows/nightly.yml) — the workflow whose cadence flip triggered this page.
|
|
106
|
-
- [`security-enhanced.yml`](https://github.com/sebastienrousseau/dotfiles/blob/main/.github/workflows/security-enhanced.yml) — earlier daily→weekly reduction.
|
|
107
|
-
- Issue [#861](https://github.com/sebastienrousseau/dotfiles/issues/861).
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# CI Composite Actions
|
|
6
|
-
|
|
7
|
-
This page documents the repo-local composite actions under
|
|
8
|
-
`.github/actions/`. These exist so the most-repeated CI setup blocks
|
|
9
|
-
have one canonical implementation, one cache key shape, and one place
|
|
10
|
-
to bump pins. Managed under
|
|
11
|
-
[#879](https://github.com/sebastienrousseau/dotfiles/issues/879).
|
|
12
|
-
|
|
13
|
-
## Available actions
|
|
14
|
-
|
|
15
|
-
### `setup-chezmoi`
|
|
16
|
-
|
|
17
|
-
Path: `.github/actions/setup-chezmoi/action.yml`
|
|
18
|
-
|
|
19
|
-
Installs the pinned `chezmoi` binary (using the SHA256-verified
|
|
20
|
-
installer at `tools/ci/install-chezmoi-verified.sh` when the repo is
|
|
21
|
-
checked out, falling back to `get.chezmoi.io` otherwise), caches the
|
|
22
|
-
result, and appends the bin-dir to `$GITHUB_PATH`.
|
|
23
|
-
|
|
24
|
-
```yaml
|
|
25
|
-
- name: Setup Chezmoi
|
|
26
|
-
uses: ./.github/actions/setup-chezmoi
|
|
27
|
-
# `version` defaults to env.CHEZMOI_VERSION. Override explicitly when
|
|
28
|
-
# the calling workflow has no env block (e.g. drift-detection):
|
|
29
|
-
with:
|
|
30
|
-
version: '2.70.3'
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Inputs:
|
|
34
|
-
|
|
35
|
-
| Name | Default | Purpose |
|
|
36
|
-
|---|---|---|
|
|
37
|
-
| `version` | `env.CHEZMOI_VERSION` | Pinned release tag (no leading `v`). |
|
|
38
|
-
| `cache` | `true` | When `false`, skip `actions/cache`. |
|
|
39
|
-
| `cache-key-prefix` | `chezmoi` | Override if a workflow wants a private cache scope. |
|
|
40
|
-
| `bin-dir` | `~/.local/bin` | Install location. |
|
|
41
|
-
|
|
42
|
-
Outputs:
|
|
43
|
-
|
|
44
|
-
| Name | Purpose |
|
|
45
|
-
|---|---|
|
|
46
|
-
| `version` | The version that ended up installed. |
|
|
47
|
-
| `path` | Absolute path to the chezmoi binary. |
|
|
48
|
-
|
|
49
|
-
Cache key shape: `<prefix>-<runner.os>-<runner.arch>-<version>`.
|
|
50
|
-
`runner.arch` is included explicitly so the Apple-Silicon (arm64) and
|
|
51
|
-
Intel (x64) macOS runners don't share a cache entry — that previously
|
|
52
|
-
caused subtle binary-mismatch failures.
|
|
53
|
-
|
|
54
|
-
### `setup-mise`
|
|
55
|
-
|
|
56
|
-
Path: `.github/actions/setup-mise/action.yml`
|
|
57
|
-
|
|
58
|
-
Installs `mise` (jdx/mise) and optionally runs `mise install` against
|
|
59
|
-
`mise.toml` to materialise the managed toolchain. Caches both the
|
|
60
|
-
mise binary and `~/.local/share/mise` (the tool install root, keyed
|
|
61
|
-
by lockfile hash).
|
|
62
|
-
|
|
63
|
-
```yaml
|
|
64
|
-
- name: Setup mise
|
|
65
|
-
uses: ./.github/actions/setup-mise
|
|
66
|
-
with:
|
|
67
|
-
install-tools: 'true'
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Inputs:
|
|
71
|
-
|
|
72
|
-
| Name | Default | Purpose |
|
|
73
|
-
|---|---|---|
|
|
74
|
-
| `version` | `latest` | mise version to install. Specify a pinned version to enable bin caching. |
|
|
75
|
-
| `cache` | `true` | Cache the mise binary + tool root. |
|
|
76
|
-
| `cache-key-prefix` | `mise` | Override the cache scope. |
|
|
77
|
-
| `install-tools` | `false` | When `true`, run `mise install` after setup. |
|
|
78
|
-
| `bin-dir` | `~/.local/bin` | Install location for the mise binary. |
|
|
79
|
-
|
|
80
|
-
Outputs: `version` (installed mise version) and `path` (absolute path
|
|
81
|
-
to the mise binary).
|
|
82
|
-
|
|
83
|
-
## Why composite actions (vs reusable workflows)
|
|
84
|
-
|
|
85
|
-
The repo already uses reusable workflows for big-grain CI steps
|
|
86
|
-
(`reusable-shell-lint.yml`, `reusable-test-suite.yml`, etc.). Composite
|
|
87
|
-
actions cover a different need:
|
|
88
|
-
|
|
89
|
-
- **Reusable workflows** wrap a whole job — same triggers, same runner,
|
|
90
|
-
same job name. Useful for "lint shell" or "run the test suite".
|
|
91
|
-
- **Composite actions** wrap a step sequence. Cheap to drop into any
|
|
92
|
-
job without restructuring the job graph.
|
|
93
|
-
|
|
94
|
-
Setup steps (install + cache + path) are the textbook composite-action
|
|
95
|
-
case: they're short, every caller wants the same behaviour, and
|
|
96
|
-
inlining them everywhere creates exactly the duplication this issue
|
|
97
|
-
called out.
|
|
98
|
-
|
|
99
|
-
## Current adopters
|
|
100
|
-
|
|
101
|
-
`setup-chezmoi` is wired into:
|
|
102
|
-
|
|
103
|
-
| Workflow | Job(s) |
|
|
104
|
-
|---|---|
|
|
105
|
-
| `ci-enforced.yml` | `test-matrix` |
|
|
106
|
-
| `ci.yml` | `test-linux`, `test-macos`, `quality-idempotency`, `performance` |
|
|
107
|
-
| `nightly.yml` | `extended-os-matrix`, `nightly-perf-bench` |
|
|
108
|
-
| `drift-detection.yml` | `drift-scan` |
|
|
109
|
-
|
|
110
|
-
Total: 8 call sites converted. The net workflow LOC delta is
|
|
111
|
-
~−34 lines (52 deletions, 18 additions); ongoing additions to either
|
|
112
|
-
workflow set will widen the gap.
|
|
113
|
-
|
|
114
|
-
`setup-mise` ships ready for use but has zero current callers because
|
|
115
|
-
no workflow currently installs mise (the maintainer relies on it
|
|
116
|
-
locally only). When a future workflow needs `cargo`, `bun`, `go`, or
|
|
117
|
-
`rust` toolchains via the canonical version manager, this composite
|
|
118
|
-
is the canonical entry point.
|
|
119
|
-
|
|
120
|
-
## Pinning policy
|
|
121
|
-
|
|
122
|
-
Both composite actions internally pin every external action they use
|
|
123
|
-
to a 40-char commit SHA (e.g.
|
|
124
|
-
`actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5`).
|
|
125
|
-
Dependabot picks these up via the standard `github-actions` ecosystem
|
|
126
|
-
configuration in `.github/dependabot.yml`.
|
|
127
|
-
|
|
128
|
-
## Bumping a pin
|
|
129
|
-
|
|
130
|
-
To upgrade `chezmoi` for every CI job at once:
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
# Find the new release:
|
|
134
|
-
gh api repos/twpayne/chezmoi/releases/latest --jq '.tag_name'
|
|
135
|
-
|
|
136
|
-
# Update the three workflow-level env declarations:
|
|
137
|
-
for f in .github/workflows/{ci.yml,ci-enforced.yml,nightly.yml}; do
|
|
138
|
-
sed -i.bak 's/CHEZMOI_VERSION: "[^"]*"/CHEZMOI_VERSION: "X.Y.Z"/' "$f"
|
|
139
|
-
rm "$f.bak"
|
|
140
|
-
done
|
|
141
|
-
|
|
142
|
-
# Drift-detection has its own pin (no env block):
|
|
143
|
-
sed -i.bak "s/version: '[^']*'/version: 'X.Y.Z'/" .github/workflows/drift-detection.yml
|
|
144
|
-
rm .github/workflows/drift-detection.yml.bak
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
Or rely on `update-deps.yml`, which already automates the env-block
|
|
148
|
-
bump on a weekly schedule.
|
|
149
|
-
|
|
150
|
-
## References
|
|
151
|
-
|
|
152
|
-
- `.github/actions/setup-chezmoi/action.yml`
|
|
153
|
-
- `.github/actions/setup-mise/action.yml`
|
|
154
|
-
- `tools/ci/install-chezmoi-verified.sh` — the SHA-pinned installer
|
|
155
|
-
the chezmoi composite prefers when available.
|
|
156
|
-
- Issue [#879](https://github.com/sebastienrousseau/dotfiles/issues/879).
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Zsh Completion Cache Lifecycle
|
|
6
|
-
|
|
7
|
-
This page documents how zsh completion compilation works in this repo
|
|
8
|
-
and how to force a rebuild. Managed under
|
|
9
|
-
[#864](https://github.com/sebastienrousseau/dotfiles/issues/864).
|
|
10
|
-
|
|
11
|
-
## The Pieces
|
|
12
|
-
|
|
13
|
-
Three caches cooperate to keep `compinit` fast without compromising
|
|
14
|
-
correctness:
|
|
15
|
-
|
|
16
|
-
1. **The compinit dump** —
|
|
17
|
-
`$XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION`. Built by
|
|
18
|
-
`compinit -d <path>` from the fpath corpus. Encodes which file
|
|
19
|
-
provides each completion function. Per-zsh-version so an OS upgrade
|
|
20
|
-
doesn't silently serve a stale binary index.
|
|
21
|
-
|
|
22
|
-
2. **The compinit dump bytecode** — `<dump>.zwc`. Built by
|
|
23
|
-
`zcompile` in the background after the dump is rebuilt. Zsh prefers
|
|
24
|
-
the `.zwc` form on subsequent shells, skipping re-parse.
|
|
25
|
-
|
|
26
|
-
3. **fpath bytecode siblings** — `_<tool>.zwc` next to each
|
|
27
|
-
`_<tool>` source file under `~/.local/share/zsh/completions/`.
|
|
28
|
-
Built once per chezmoi apply by
|
|
29
|
-
`run_onchange_after_zcompile-completions.sh.tmpl` (so this happens
|
|
30
|
-
*outside* the critical shell-start path). Zsh prefers the `.zwc`
|
|
31
|
-
when autoloading the corresponding completion function.
|
|
32
|
-
|
|
33
|
-
## Flow on Shell Start
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
zsh starts
|
|
37
|
-
→ sources rc.d (no compinit yet)
|
|
38
|
-
→ registers a `preexec` (or `precmd`) hook
|
|
39
|
-
→ returns to prompt
|
|
40
|
-
user presses Tab (or `precmd` fires)
|
|
41
|
-
→ `compinit -d $XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION`
|
|
42
|
-
or `compinit -C -d <dump>` if the dump is < 24 hours old
|
|
43
|
-
→ background `zcompile` of the dump
|
|
44
|
-
→ first tab-completion uses the precompiled `.zwc` for each tool
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Flow on Chezmoi Apply
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
chezmoi apply
|
|
51
|
-
→ if completion sources changed, run_onchange fires
|
|
52
|
-
run_onchange_after_zcompile-completions.sh.tmpl
|
|
53
|
-
→ walks ~/.local/share/zsh/completions/
|
|
54
|
-
→ for each _<tool> file whose .zwc is missing or stale:
|
|
55
|
-
zsh -c "zcompile <file>"
|
|
56
|
-
→ reports compiled=N skipped=M
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Configuration Surface
|
|
60
|
-
|
|
61
|
-
| Variable | Default | Purpose |
|
|
62
|
-
|---|---|---|
|
|
63
|
-
| `DOTFILES_ENABLE_COMPINIT` | 1 on `laptop`/`desktop` profiles, 0 elsewhere | Whether to load the completion subsystem at all. Non-laptop profiles skip the runtime cost but still benefit from precompiled `.zwc` files if present. |
|
|
64
|
-
| `DOTFILES_DEFER_COMPINIT` | 1 | When 1, compinit runs on first `preexec`. When 0, runs on `precmd`. |
|
|
65
|
-
| `DOTFILES_FAST` | 0 | When 1, the entire completion path is skipped. |
|
|
66
|
-
| `DOTFILES_ULTRA_FAST` | 0 | Same as `DOTFILES_FAST` but more aggressive. |
|
|
67
|
-
| `DOTFILES_SKIP_ZCOMPILE` | 0 | When 1, the run_onchange hook does not precompile fpath files. Used in CI / minimal images where bytecode isn't needed. |
|
|
68
|
-
| `XDG_CACHE_HOME` | `$HOME/.cache` | Standard XDG override; the dump path is `$XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION`. |
|
|
69
|
-
|
|
70
|
-
## Force Rebuild
|
|
71
|
-
|
|
72
|
-
When completions go stale (e.g., after a tool upgrade):
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
# Invalidate the compinit dump — next shell rebuilds it.
|
|
76
|
-
rm -f "${XDG_CACHE_HOME:-$HOME/.cache}/zsh/zcompdump-${ZSH_VERSION}"
|
|
77
|
-
rm -f "${XDG_CACHE_HOME:-$HOME/.cache}/zsh/zcompdump-${ZSH_VERSION}.zwc"
|
|
78
|
-
|
|
79
|
-
# Force regeneration of fpath bytecode siblings:
|
|
80
|
-
find ~/.local/share/zsh/completions -name '*.zwc' -delete
|
|
81
|
-
chezmoi apply ~ # re-runs the run_onchange hook
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Or, equivalently, `dot heal` (which calls both in sequence).
|
|
85
|
-
|
|
86
|
-
## Measured Cost
|
|
87
|
-
|
|
88
|
-
The current dotfiles ship with `compinit` deferred to first-prompt,
|
|
89
|
-
which means shell *startup* time is already nearly minimal — zsh
|
|
90
|
-
doesn't parse the fpath corpus until tab-completion is invoked. The
|
|
91
|
-
precompiled `.zwc` files cut down the *first tab-completion* latency
|
|
92
|
-
per tool, not shell-start latency. On a 2026 M-series macOS host the
|
|
93
|
-
P50 for `time zsh -i -c exit` measured at 39 ms before this change
|
|
94
|
-
and 39 ms after — the change pays off when the user starts typing,
|
|
95
|
-
not before.
|
|
96
|
-
|
|
97
|
-
This makes the lifecycle policy still worth shipping:
|
|
98
|
-
|
|
99
|
-
- Cleaner cache layout (XDG-cache, version-keyed).
|
|
100
|
-
- Bytecode siblings auto-picked on non-laptop profiles (which skip
|
|
101
|
-
compinit entirely) so completion is still fast even without the
|
|
102
|
-
full subsystem.
|
|
103
|
-
- A documented force-rebuild path.
|
|
104
|
-
|
|
105
|
-
## Skip Rules
|
|
106
|
-
|
|
107
|
-
The run_onchange hook skips itself when:
|
|
108
|
-
|
|
109
|
-
- `DOTFILES_SKIP_ZCOMPILE=1` (CI / minimal images).
|
|
110
|
-
- `zsh` is not on PATH (servers without an interactive shell).
|
|
111
|
-
- `~/.local/share/zsh/completions/` doesn't exist.
|
|
112
|
-
|
|
113
|
-
System fpath directories (Homebrew, `/usr/local/share/zsh`) are
|
|
114
|
-
intentionally NOT precompiled — the package manager already manages
|
|
115
|
-
their lifecycle.
|
|
116
|
-
|
|
117
|
-
## References
|
|
118
|
-
|
|
119
|
-
- [`dot_config/zsh/rc.d/30-options.zsh.tmpl`](https://github.com/sebastienrousseau/dotfiles/blob/main/defaults/dot_config/zsh/rc.d/30-options.zsh.tmpl) — the deferred-compinit logic.
|
|
120
|
-
- [`run_onchange_after_zcompile-completions.sh.tmpl`](https://github.com/sebastienrousseau/dotfiles/blob/main/defaults/run_onchange_after_zcompile-completions.sh.tmpl) — the apply-time precompile hook.
|
|
121
|
-
- [`zsh` completion docs](https://zsh.sourceforge.io/Doc/Release/Completion-System.html).
|
|
122
|
-
- ADR-002 (Shell Performance Optimization).
|
|
123
|
-
- Issue [#864](https://github.com/sebastienrousseau/dotfiles/issues/864).
|