@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,197 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Tutorial: First Install
|
|
6
|
-
|
|
7
|
-
End-to-end installation and verification, from zero to a fully-working environment in under 5 minutes.
|
|
8
|
-
|
|
9
|
-
## Prerequisites
|
|
10
|
-
|
|
11
|
-
- macOS 14+, Ubuntu/Debian 20.04+, Arch (rolling), Fedora 39+, or WSL2 on Windows 11
|
|
12
|
-
- `git` and `curl` installed
|
|
13
|
-
- Shell access (Zsh, Fish, or Bash)
|
|
14
|
-
- Optional but recommended: SSH key for signing commits
|
|
15
|
-
|
|
16
|
-
## Step 1: Run the Installer
|
|
17
|
-
|
|
18
|
-
```sh
|
|
19
|
-
bash -c "$(curl -fsSL https://raw.githubusercontent.com/sebastienrousseau/dotfiles/main/install.sh)"
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
The installer:
|
|
23
|
-
|
|
24
|
-
1. Verifies prerequisites (`git`, `curl`, write access to `~`)
|
|
25
|
-
2. Downloads chezmoi via the SHA256-verified installer
|
|
26
|
-
3. Clones the dotfiles source to `~/.dotfiles`
|
|
27
|
-
4. Runs `chezmoi init` to prompt for per-machine settings
|
|
28
|
-
5. Runs `chezmoi apply` with progress output
|
|
29
|
-
|
|
30
|
-
Expected output:
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
[install] Verifying prerequisites
|
|
34
|
-
[install] Installing chezmoi (verified SHA256)
|
|
35
|
-
[install] Cloning source to ~/.dotfiles
|
|
36
|
-
[install] Running chezmoi init (interactive)
|
|
37
|
-
Git email: you@example.com
|
|
38
|
-
Machine preset [macbook-t2]:
|
|
39
|
-
Default theme [tahoe-dark]:
|
|
40
|
-
Default shell [fish]:
|
|
41
|
-
[install] Applying configuration (180 files)
|
|
42
|
-
[install] ✓ Installation complete
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Step 2: Verify
|
|
46
|
-
|
|
47
|
-
Open a new shell and run:
|
|
48
|
-
|
|
49
|
-
```sh
|
|
50
|
-
dot doctor
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Expected output:
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
◈ DOTFILES
|
|
57
|
-
Dot • Diagnostics
|
|
58
|
-
|
|
59
|
-
--- Health Check ---
|
|
60
|
-
✓ Paths ~/.local/bin, mise shims present
|
|
61
|
-
✓ Tools git, chezmoi, mise installed
|
|
62
|
-
✓ Chezmoi clean (no drift)
|
|
63
|
-
✓ Shell fish (500ms startup)
|
|
64
|
-
✓ Security SSH key present, Age key present
|
|
65
|
-
✓ Portability LC_ALL=en_US.UTF-8, TERM=xterm-256color
|
|
66
|
-
|
|
67
|
-
Score: 98/100
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Any warnings will be accompanied by a suggested fix.
|
|
71
|
-
|
|
72
|
-
## Step 3: Take the Tour
|
|
73
|
-
|
|
74
|
-
```sh
|
|
75
|
-
dot learn
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
An interactive walkthrough covering:
|
|
79
|
-
|
|
80
|
-
- Shell basics and aliases
|
|
81
|
-
- Secrets workflow
|
|
82
|
-
- Theme switching
|
|
83
|
-
- Performance tuning
|
|
84
|
-
- Security hardening
|
|
85
|
-
|
|
86
|
-
Each section takes 30-60 seconds. You can skip sections or exit at any time.
|
|
87
|
-
|
|
88
|
-
## Step 4: Customize
|
|
89
|
-
|
|
90
|
-
### Per-Machine Settings
|
|
91
|
-
|
|
92
|
-
Edit `~/.config/chezmoi/chezmoi.toml`:
|
|
93
|
-
|
|
94
|
-
```toml
|
|
95
|
-
[data]
|
|
96
|
-
machine = "macbook-t2" # see .chezmoidata/hardware.toml for presets
|
|
97
|
-
theme = "tahoe-dark" # see `dot theme list`
|
|
98
|
-
default_shell = "fish" # fish, zsh, bash
|
|
99
|
-
terminal_font_family = "JetBrainsMono Nerd Font"
|
|
100
|
-
terminal_font_size = 12
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Feature Flags
|
|
104
|
-
|
|
105
|
-
Edit `.chezmoidata.toml` in the source directory (`~/.dotfiles/.chezmoidata.toml`):
|
|
106
|
-
|
|
107
|
-
```toml
|
|
108
|
-
[features]
|
|
109
|
-
dms = false # Dank Material Shell (Niri)
|
|
110
|
-
linux_desktop = false # Linux-specific desktop configs
|
|
111
|
-
waybar = false # Waybar status bar
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
After editing, apply:
|
|
115
|
-
|
|
116
|
-
```sh
|
|
117
|
-
dot apply
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
## Step 5: Add Your Identity
|
|
121
|
-
|
|
122
|
-
If you have an SSH key, configure signed commits:
|
|
123
|
-
|
|
124
|
-
```sh
|
|
125
|
-
git config --global user.signingkey ~/.ssh/id_ed25519.pub
|
|
126
|
-
git config --global commit.gpgsign true
|
|
127
|
-
git config --global gpg.format ssh
|
|
128
|
-
git config --global gpg.ssh.allowedSignersFile ~/.ssh/allowed_signers
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
Add your own key to `~/.ssh/allowed_signers`:
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
you@example.com ssh-ed25519 AAAA...
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Test:
|
|
138
|
-
|
|
139
|
-
```sh
|
|
140
|
-
cd ~/.dotfiles
|
|
141
|
-
git commit --allow-empty -m "test: signature"
|
|
142
|
-
git verify-commit HEAD
|
|
143
|
-
# Good "git" signature for you@example.com
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
## Step 6: First Theme Switch
|
|
147
|
-
|
|
148
|
-
```sh
|
|
149
|
-
dot theme
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
A picker opens showing all paired wallpaper themes on your system. Select one and press Enter. The terminal, editor, desktop wallpaper, and macOS accent color update in about 3 seconds.
|
|
153
|
-
|
|
154
|
-
## Troubleshooting
|
|
155
|
-
|
|
156
|
-
If `dot doctor` shows failures:
|
|
157
|
-
|
|
158
|
-
```sh
|
|
159
|
-
dot heal # auto-fix common issues
|
|
160
|
-
dot heal -n # dry-run first to see what would change
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
If the installation is broken beyond repair:
|
|
164
|
-
|
|
165
|
-
```sh
|
|
166
|
-
dot rollback # restore the previous known-good state
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
If `dot doctor` still fails after heal + rollback, check:
|
|
170
|
-
|
|
171
|
-
- `~/.local/state/dotfiles/install.log` — installer log
|
|
172
|
-
- `~/.local/state/dotfiles/heal.log` — heal attempts
|
|
173
|
-
- `chezmoi doctor` — chezmoi-specific diagnostics
|
|
174
|
-
|
|
175
|
-
Still stuck? See [Cookbook: Troubleshooting](../04-cookbook/02-troubleshooting.md).
|
|
176
|
-
|
|
177
|
-
## What Got Installed
|
|
178
|
-
|
|
179
|
-
After `dot doctor` reports a healthy score, you have:
|
|
180
|
-
|
|
181
|
-
| Surface | What's There |
|
|
182
|
-
|:---|:---|
|
|
183
|
-
| **Shell** | Fish (default), Zsh, Nushell, Bash all configured with cached init |
|
|
184
|
-
| **Editor** | Neovim with lazy.nvim + LSP + theme-synced colorscheme |
|
|
185
|
-
| **Terminal** | Ghostty/Alacritty/Kitty/WezTerm configs (pick whichever is installed) |
|
|
186
|
-
| **Git** | Signed commits, delta diff, conventional commit template |
|
|
187
|
-
| **AI tooling** | Codex, Copilot CLI, Antigravity CLI (`agy`) via native installer; Claude Code via Anthropic's native installer |
|
|
188
|
-
| **Secret store** | Age key, SOPS config, `dot secrets` command ready |
|
|
189
|
-
| **Security** | Gitleaks, detect-secrets baseline, signed attestation log |
|
|
190
|
-
| **Theme engine** | K-Means wallpaper extractor, system + custom wallpaper discovery |
|
|
191
|
-
|
|
192
|
-
## Next
|
|
193
|
-
|
|
194
|
-
- [Tutorial: Add a Wallpaper → Theme](02-add-wallpaper.md)
|
|
195
|
-
- [Tutorial: Create a Machine Profile](03-create-profile.md)
|
|
196
|
-
- [Tutorial: Encrypt a Secret](04-encrypt-secret.md)
|
|
197
|
-
- [Cookbook: 30+ recipes](../04-cookbook/01-recipes.md)
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Tutorial: Add a Wallpaper → Theme
|
|
6
|
-
|
|
7
|
-
Drop an image. Get a fully-WCAG-AAA terminal theme.
|
|
8
|
-
|
|
9
|
-
## Prerequisites
|
|
10
|
-
|
|
11
|
-
- Dotfiles installed (see [First Install](01-first-install.md))
|
|
12
|
-
- `magick` (ImageMagick) and `python3` available (installed by default)
|
|
13
|
-
- Optional: `heif-enc` for creating dynamic HEIC (`brew install libheif`)
|
|
14
|
-
|
|
15
|
-
## Option A: Drop a Static Image
|
|
16
|
-
|
|
17
|
-
The simplest path: place a wallpaper in `~/Pictures/Wallpapers/` and rebuild.
|
|
18
|
-
|
|
19
|
-
```sh
|
|
20
|
-
cp ~/Downloads/my-wallpaper.jpg ~/Pictures/Wallpapers/mytheme-dark.jpg
|
|
21
|
-
cp ~/Downloads/my-wallpaper-light.jpg ~/Pictures/Wallpapers/mytheme-light.jpg
|
|
22
|
-
|
|
23
|
-
dot theme rebuild
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Expected output:
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
Discovering wallpapers...
|
|
30
|
-
Found: 126 system, 26 custom (152 total)
|
|
31
|
-
|
|
32
|
-
Generating themes...
|
|
33
|
-
Processing 2 wallpapers (4 parallel jobs)...
|
|
34
|
-
mytheme-dark [custom] ✓
|
|
35
|
-
mytheme-light [custom] ✓
|
|
36
|
-
|
|
37
|
-
Results: 2 processed, 150 cached, 0 failed
|
|
38
|
-
|
|
39
|
-
Assembling themes.toml...
|
|
40
|
-
Written: ~/.dotfiles/.chezmoidata/themes.toml (608 theme sections)
|
|
41
|
-
|
|
42
|
-
Done. Run 'dot theme list' to see available themes.
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Switch to the new theme:
|
|
46
|
-
|
|
47
|
-
```sh
|
|
48
|
-
dot theme mytheme-dark
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Option B: Dynamic HEIC (Recommended)
|
|
52
|
-
|
|
53
|
-
Apple's dynamic HEIC format stores both dark and light variants in a single file with metadata that macOS uses to auto-switch appearance. This is the native format for Apple system wallpapers.
|
|
54
|
-
|
|
55
|
-
### Create a Dynamic HEIC From a Pair
|
|
56
|
-
|
|
57
|
-
If you have `mytheme-dark.jpg` + `mytheme-light.jpg`:
|
|
58
|
-
|
|
59
|
-
```sh
|
|
60
|
-
bash scripts/theme/merge-wallpaper.sh mytheme
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
This:
|
|
64
|
-
|
|
65
|
-
1. Resizes both to 6016×6016 (preserving aspect ratio, center-cropped)
|
|
66
|
-
2. Encodes both into a single `.heic` via `heif-enc`
|
|
67
|
-
3. Injects `apple_desktop:apr` XMP metadata (image 0 = light, image 1 = dark)
|
|
68
|
-
4. Writes to `~/Pictures/Wallpapers/mytheme.heic`
|
|
69
|
-
5. Removes the two source files
|
|
70
|
-
|
|
71
|
-
Verify:
|
|
72
|
-
|
|
73
|
-
```sh
|
|
74
|
-
heif-info ~/Pictures/Wallpapers/mytheme.heic
|
|
75
|
-
# image: 6016x6016 (id=1), primary ← light
|
|
76
|
-
# image: 6016x6016 (id=4) ← dark
|
|
77
|
-
# metadata:
|
|
78
|
-
# XMP: 2473 bytes ← appearance mapping
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### Rebuild Themes
|
|
82
|
-
|
|
83
|
-
```sh
|
|
84
|
-
dot theme rebuild
|
|
85
|
-
# mytheme-light [custom] ✓
|
|
86
|
-
# mytheme-dark [custom] ✓
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
The engine extracts each frame independently and generates paired themes.
|
|
90
|
-
|
|
91
|
-
## Option C: Golden Ratio Brightness (Advanced)
|
|
92
|
-
|
|
93
|
-
For best perceived contrast between your dark and light themes, target a brightness ratio of ~1.6× (the golden ratio, approximately 1.618).
|
|
94
|
-
|
|
95
|
-
Measure:
|
|
96
|
-
|
|
97
|
-
```sh
|
|
98
|
-
magick ~/Pictures/Wallpapers/mytheme-dark.jpg -resize 1x1\! -format '%[fx:mean]' info:
|
|
99
|
-
# 0.30
|
|
100
|
-
|
|
101
|
-
magick ~/Pictures/Wallpapers/mytheme-light.jpg -resize 1x1\! -format '%[fx:mean]' info:
|
|
102
|
-
# 0.48
|
|
103
|
-
# Ratio: 0.48 / 0.30 = 1.6 ← ideal
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Adjust a pair if the ratio is off:
|
|
107
|
-
|
|
108
|
-
```sh
|
|
109
|
-
# Darken light to 0.485 brightness
|
|
110
|
-
mod=$(python3 -c "print(int((0.485 / 0.60) * 100))") # current mean = 0.60
|
|
111
|
-
magick input.jpg -modulate ${mod},100,100 output.jpg
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## Option D: Install System Wallpapers (Already-Available)
|
|
115
|
-
|
|
116
|
-
macOS ships dozens of wallpapers you can use directly — no download needed.
|
|
117
|
-
|
|
118
|
-
List what's available:
|
|
119
|
-
|
|
120
|
-
```sh
|
|
121
|
-
dot theme rebuild --list
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
Output:
|
|
125
|
-
|
|
126
|
-
```
|
|
127
|
-
NAME SOURCE PATH
|
|
128
|
-
---- ------ ----
|
|
129
|
-
monterey-dark system /System/Library/Desktop Pictures/.thumbnails/Monterey Dark.heic
|
|
130
|
-
monterey-light system /System/Library/Desktop Pictures/.thumbnails/Monterey Light.heic
|
|
131
|
-
tahoe-dark system /System/Library/Desktop Pictures/.thumbnails/Tahoe Dark.heic
|
|
132
|
-
tahoe-light system /System/Library/Desktop Pictures/.thumbnails/Tahoe Light.heic
|
|
133
|
-
sonoma-dark system /System/Library/Desktop Pictures/.thumbnails/Sonoma Dark.heic
|
|
134
|
-
...
|
|
135
|
-
Total: 152 wallpapers
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Switch to any system wallpaper:
|
|
139
|
-
|
|
140
|
-
```sh
|
|
141
|
-
dot theme monterey-dark
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
The engine extracts Monterey Dark's dominant colors, generates a palette, and applies it to every surface.
|
|
145
|
-
|
|
146
|
-
## Verifying the Result
|
|
147
|
-
|
|
148
|
-
After a switch, check the applied colors:
|
|
149
|
-
|
|
150
|
-
```sh
|
|
151
|
-
# See the current theme's palette
|
|
152
|
-
grep -A30 "^\[themes.mytheme-dark\]" ~/.dotfiles/.chezmoidata/themes.toml
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
Check WCAG compliance (always passes for generated themes):
|
|
156
|
-
|
|
157
|
-
```sh
|
|
158
|
-
bash tests/unit/theme/test_themes_toml.sh
|
|
159
|
-
# RESULTS: 11:11:0 (11 tests, 11 passed, 0 failed)
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
Verify the applied wallpaper:
|
|
163
|
-
|
|
164
|
-
```sh
|
|
165
|
-
# macOS
|
|
166
|
-
osascript -e 'tell application "System Events" to get picture of every desktop'
|
|
167
|
-
|
|
168
|
-
# Linux (GNOME)
|
|
169
|
-
gsettings get org.gnome.desktop.background picture-uri
|
|
170
|
-
gsettings get org.gnome.desktop.background picture-uri-dark
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
## Troubleshooting
|
|
174
|
-
|
|
175
|
-
### Low Contrast on Both Variants
|
|
176
|
-
|
|
177
|
-
Your wallpaper pair doesn't have enough brightness difference. The theme will still generate but `dot theme list` may filter it from the picker. Adjust the source images to increase separation (brighter light variant, darker dark variant).
|
|
178
|
-
|
|
179
|
-
### K-Means Failed to Converge
|
|
180
|
-
|
|
181
|
-
Rare, but possible with images that are nearly solid color. The engine uses a seeded RNG and 3 runs — if all 3 fail, the output theme is skipped. Fix: use a more chromatic source image.
|
|
182
|
-
|
|
183
|
-
### Wallpaper Doesn't Apply on Linux
|
|
184
|
-
|
|
185
|
-
Check your desktop environment:
|
|
186
|
-
|
|
187
|
-
- **GNOME** — uses `gsettings picture-uri` (HEIC auto-converted to PNG)
|
|
188
|
-
- **KDE** — uses `plasma-apply-wallpaperimage`
|
|
189
|
-
- **Niri** — uses DMS IPC or `swaybg`
|
|
190
|
-
- **i3/sway (no DE)** — falls back to `feh`
|
|
191
|
-
|
|
192
|
-
If none are detected, set `$WALLPAPER_COMMAND` in `~/.config/dotfiles/config`.
|
|
193
|
-
|
|
194
|
-
### The Dark/Light Auto-Switch Isn't Working on macOS
|
|
195
|
-
|
|
196
|
-
The `apple_desktop:apr` metadata may be missing. Verify:
|
|
197
|
-
|
|
198
|
-
```sh
|
|
199
|
-
magick ~/Pictures/Wallpapers/mytheme.heic -format '%[XMP]' info: | grep apple_desktop
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
If empty, re-run `merge-wallpaper.sh` — the XMP injection step may have failed due to missing `exiftool`.
|
|
203
|
-
|
|
204
|
-
## Summary
|
|
205
|
-
|
|
206
|
-
You've added a custom wallpaper, generated a WCAG AAA theme from it, and verified cross-surface application. You can now:
|
|
207
|
-
|
|
208
|
-
- Add more wallpapers to build a library
|
|
209
|
-
- Share your wallpaper directory across fleet hosts (it's gitignored by default)
|
|
210
|
-
- Use `dot theme toggle` to swap dark↔light of your current family
|
|
211
|
-
|
|
212
|
-
## Next
|
|
213
|
-
|
|
214
|
-
- [Concept: The Theme Engine](../01-concepts/03-theme-engine.md) — deep dive
|
|
215
|
-
- [Tutorial: Create a Profile](03-create-profile.md)
|
|
216
|
-
- [Cookbook: Theming Recipes](../04-cookbook/01-recipes.md)
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
{% raw %}
|
|
5
|
-
|
|
6
|
-
# Tutorial: Create a Machine Profile
|
|
7
|
-
|
|
8
|
-
Machine profiles tell chezmoi how to render templates differently on each host — display scale, keyboard layout, performance preset, available features.
|
|
9
|
-
|
|
10
|
-
## When to Use a Profile
|
|
11
|
-
|
|
12
|
-
- You have more than one host (laptop + desktop, work + personal)
|
|
13
|
-
- Your hardware differs materially (HiDPI laptop vs 1080p external, ARM vs x86)
|
|
14
|
-
- Certain features only apply to specific setups (Niri on Wayland, AeroSpace on macOS)
|
|
15
|
-
|
|
16
|
-
## Step 1: Choose or Create a Preset
|
|
17
|
-
|
|
18
|
-
Presets live in `.chezmoidata/hardware.toml`:
|
|
19
|
-
|
|
20
|
-
```toml
|
|
21
|
-
[hardware.macbook-t2]
|
|
22
|
-
display_scale = 2.0
|
|
23
|
-
kbd_layout = "qwerty"
|
|
24
|
-
modifier_mode = "left-cmd-control"
|
|
25
|
-
perf_profile = "laptop"
|
|
26
|
-
wm = "aerospace"
|
|
27
|
-
[hardware.macbook-t2.features]
|
|
28
|
-
retina = true
|
|
29
|
-
touchid = true
|
|
30
|
-
|
|
31
|
-
[hardware.surface-pro]
|
|
32
|
-
display_scale = 1.5
|
|
33
|
-
kbd_layout = "colemak-dh"
|
|
34
|
-
modifier_mode = "standard"
|
|
35
|
-
perf_profile = "laptop"
|
|
36
|
-
wm = "niri"
|
|
37
|
-
[hardware.surface-pro.features]
|
|
38
|
-
touch = true
|
|
39
|
-
pen = true
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
If an existing preset fits: use its name. Otherwise, add a new one.
|
|
43
|
-
|
|
44
|
-
## Step 2: Select the Preset for This Host
|
|
45
|
-
|
|
46
|
-
Edit `~/.config/chezmoi/chezmoi.toml`:
|
|
47
|
-
|
|
48
|
-
```toml
|
|
49
|
-
[data]
|
|
50
|
-
machine = "surface-pro" # choose from .chezmoidata/hardware.toml
|
|
51
|
-
theme = "monterey-dark"
|
|
52
|
-
default_shell = "fish"
|
|
53
|
-
terminal_font_family = "JetBrainsMono Nerd Font"
|
|
54
|
-
terminal_font_size = 11 # larger for HiDPI, smaller for dense screens
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
`chezmoi.toml` is **not** in the repository — each host has its own. Generated by `chezmoi init` on first install.
|
|
58
|
-
|
|
59
|
-
## Step 3: Reference the Preset in Templates
|
|
60
|
-
|
|
61
|
-
Inside any `.tmpl` file:
|
|
62
|
-
|
|
63
|
-
```go
|
|
64
|
-
{{- $hw := index .hardware .machine }}
|
|
65
|
-
|
|
66
|
-
# Ghostty config — uses machine-specific font size
|
|
67
|
-
font-family = "{{ .terminal_font_family }}"
|
|
68
|
-
font-size = {{ .terminal_font_size }}
|
|
69
|
-
|
|
70
|
-
# DPI-aware settings
|
|
71
|
-
{{ if eq $hw.display_scale 2.0 }}
|
|
72
|
-
window-decoration = false
|
|
73
|
-
{{ else }}
|
|
74
|
-
window-decoration = true
|
|
75
|
-
{{ end }}
|
|
76
|
-
|
|
77
|
-
# Feature-gated config
|
|
78
|
-
{{ if $hw.features.touch }}
|
|
79
|
-
mouse-scroll-multiplier = 3
|
|
80
|
-
{{ end }}
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
After editing the template, run `chezmoi apply` or `dot apply`.
|
|
84
|
-
|
|
85
|
-
## Step 4: Add a New Preset
|
|
86
|
-
|
|
87
|
-
Suppose you have a new mini PC. Add to `.chezmoidata/hardware.toml`:
|
|
88
|
-
|
|
89
|
-
```toml
|
|
90
|
-
[hardware.my-nuc]
|
|
91
|
-
display_scale = 1.0 # external 1440p
|
|
92
|
-
kbd_layout = "qwerty"
|
|
93
|
-
modifier_mode = "standard"
|
|
94
|
-
perf_profile = "desktop"
|
|
95
|
-
wm = "gnome"
|
|
96
|
-
[hardware.my-nuc.features]
|
|
97
|
-
multi-monitor = true
|
|
98
|
-
gaming = true
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Then on that host:
|
|
102
|
-
|
|
103
|
-
```toml
|
|
104
|
-
# ~/.config/chezmoi/chezmoi.toml
|
|
105
|
-
[data]
|
|
106
|
-
machine = "my-nuc"
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Apply:
|
|
110
|
-
|
|
111
|
-
```sh
|
|
112
|
-
dot apply
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Templates automatically pick up the new preset data.
|
|
116
|
-
|
|
117
|
-
## Step 5: Per-Preset Feature Flags
|
|
118
|
-
|
|
119
|
-
Feature flags in `.chezmoidata.toml` can be gated by preset:
|
|
120
|
-
|
|
121
|
-
```toml
|
|
122
|
-
# .chezmoidata.toml — defaults for all hosts
|
|
123
|
-
[features]
|
|
124
|
-
dms = false
|
|
125
|
-
linux_desktop = false
|
|
126
|
-
waybar = false
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Override per-preset in `.chezmoidata/hardware.toml`:
|
|
130
|
-
|
|
131
|
-
```toml
|
|
132
|
-
[hardware.surface-pro.features]
|
|
133
|
-
touch = true
|
|
134
|
-
pen = true
|
|
135
|
-
dms = true # override feature default
|
|
136
|
-
waybar = true
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
In templates:
|
|
140
|
-
|
|
141
|
-
```go
|
|
142
|
-
{{- $hw := index .hardware .machine }}
|
|
143
|
-
{{- $features := mergeOverwrite .features $hw.features }}
|
|
144
|
-
|
|
145
|
-
{{ if $features.waybar }}
|
|
146
|
-
# ... waybar-specific config ...
|
|
147
|
-
{{ end }}
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
## Example: Font Size by Preset
|
|
151
|
-
|
|
152
|
-
A single Ghostty config that renders correctly on every host:
|
|
153
|
-
|
|
154
|
-
```go
|
|
155
|
-
# dot_config/ghostty/config.tmpl
|
|
156
|
-
{{- $hw := index .hardware .machine }}
|
|
157
|
-
|
|
158
|
-
theme = {{ .theme }}
|
|
159
|
-
font-family = "{{ .terminal_font_family }}"
|
|
160
|
-
|
|
161
|
-
# DPI-aware font sizing
|
|
162
|
-
{{ if eq $hw.display_scale 2.0 }}
|
|
163
|
-
font-size = 12 # Retina MacBook
|
|
164
|
-
{{ else if eq $hw.display_scale 1.5 }}
|
|
165
|
-
font-size = 11 # Surface Pro
|
|
166
|
-
{{ else }}
|
|
167
|
-
font-size = 14 # External 1440p/4K
|
|
168
|
-
{{ end }}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
On the MacBook: 12pt. On the Surface: 11pt. On the NUC: 14pt. One template.
|
|
172
|
-
|
|
173
|
-
## Example: Platform × Preset
|
|
174
|
-
|
|
175
|
-
Combine `.chezmoi.os` with the preset:
|
|
176
|
-
|
|
177
|
-
```go
|
|
178
|
-
{{- $hw := index .hardware .machine }}
|
|
179
|
-
|
|
180
|
-
{{ if and (eq .chezmoi.os "darwin") (eq $hw.wm "aerospace") }}
|
|
181
|
-
# macOS + AeroSpace specifics
|
|
182
|
-
{{ else if and (eq .chezmoi.os "linux") (eq $hw.wm "niri") }}
|
|
183
|
-
# Linux + Niri specifics
|
|
184
|
-
{{ end }}
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## Listing Known Presets
|
|
188
|
-
|
|
189
|
-
```sh
|
|
190
|
-
chezmoi execute-template '{{- range $name, $_ := .hardware }}{{ $name }}{{ "\n" }}{{ end }}'
|
|
191
|
-
# macbook-t2
|
|
192
|
-
# surface-pro
|
|
193
|
-
# geekom-a9
|
|
194
|
-
# my-nuc
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
## Changing Presets on an Existing Host
|
|
198
|
-
|
|
199
|
-
If you reassign a host to a different preset:
|
|
200
|
-
|
|
201
|
-
```sh
|
|
202
|
-
# Edit ~/.config/chezmoi/chezmoi.toml
|
|
203
|
-
# machine = "my-nuc" (was "surface-pro")
|
|
204
|
-
|
|
205
|
-
dot apply --dry-run # preview changes
|
|
206
|
-
dot apply # apply
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
Chezmoi re-renders every template with the new preset data. No reboot needed.
|
|
210
|
-
|
|
211
|
-
## Troubleshooting
|
|
212
|
-
|
|
213
|
-
### "Machine preset 'foo' not found"
|
|
214
|
-
|
|
215
|
-
The `machine` value in `~/.config/chezmoi/chezmoi.toml` doesn't match any key under `[hardware.*]` in `.chezmoidata/hardware.toml`. Check spelling.
|
|
216
|
-
|
|
217
|
-
### Templates Silently Use Defaults
|
|
218
|
-
|
|
219
|
-
Make sure you're using `{{- $hw := index .hardware .machine }}` at the top of templates. If `machine` is empty, `index` returns `nil` — reference with `{{- with $hw }}...{{- end }}` guards.
|
|
220
|
-
|
|
221
|
-
### Feature Flag Not Taking Effect
|
|
222
|
-
|
|
223
|
-
Verify the merge order:
|
|
224
|
-
|
|
225
|
-
```sh
|
|
226
|
-
chezmoi execute-template '{{- $hw := index .hardware .machine -}}{{- $f := mergeOverwrite .features $hw.features -}}{{ $f | toToml }}'
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
Per-preset features must override global defaults. If the output doesn't reflect that, check template syntax.
|
|
230
|
-
|
|
231
|
-
## Summary
|
|
232
|
-
|
|
233
|
-
Profiles let one source tree produce correctly-configured output on every host you own. The machinery:
|
|
234
|
-
|
|
235
|
-
1. `.chezmoidata/hardware.toml` defines presets (declarative)
|
|
236
|
-
2. `~/.config/chezmoi/chezmoi.toml` selects a preset per host (per-host override)
|
|
237
|
-
3. `.tmpl` files read `.hardware` + `.machine` (template-time)
|
|
238
|
-
|
|
239
|
-
## Next
|
|
240
|
-
|
|
241
|
-
- [Concept: Fleet Architecture](../01-concepts/04-fleet.md)
|
|
242
|
-
- [Reference: Templates](../03-reference/04-templates.md)
|
|
243
|
-
- [Reference: Feature Flags](../03-reference/05-feature-flags.md)
|
|
244
|
-
{% endraw %}
|