Skip to content

Add comprehensive chezmoi notes with modern templating best practices#705

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/improve-chezmoi-templating
Draft

Add comprehensive chezmoi notes with modern templating best practices#705
Copilot wants to merge 4 commits intomainfrom
copilot/improve-chezmoi-templating

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 26, 2025

Created chezmoi documentation covering 10+ modern best practices based on current chezmoi docs, plus updated outdated chezmoi references in docker.md.

New: content/notes/development/tooling/chezmoi.md

  • Template syntax: Whitespace control with {{- and -}}
  • OS detection: .chezmoi.os, .chezmoi.osRelease.id, WSL detection, chassis type
  • Reusable templates: .chezmoitemplates/ with TOML data injection
  • Secret management: 1Password (onepasswordRead) and Bitwarden integration
  • External dependencies: .chezmoiexternal.toml for oh-my-zsh, vim-plug, GitHub releases
  • Conditional ignoring: Templated .chezmoiignore patterns
  • Init prompts: promptStringOnce, promptChoiceOnce, promptBoolOnce
  • Age encryption: Key generation, passphrase protection, auto-decrypt scripts
  • Run scripts: run_once_, run_onchange_, run_before_/run_after_, daily/weekly scheduling
  • Debugging: chezmoi data, chezmoi execute-template

Example pattern for OS-specific config:

{{- $osid := .chezmoi.os -}}
{{- if hasKey .chezmoi.osRelease "id" -}}
{{-   $osid = printf "%s-%s" .chezmoi.os .chezmoi.osRelease.id -}}
{{- end -}}

{{ if eq .osid "linux-debian" }}
# Debian-specific configuration
{{ end }}

Updated: content/notes/development/tooling/docker.md

  • Replaced deprecated git.io/chezmoi with get.chezmoi.io
  • Added proper shell code blocks
  • Cross-linked to new chezmoi notes
Original prompt

Consider current chezmoi templating against chezmoi docs (context7) and make 10 improvements without regression to leverage chezmoi correctly.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 26, 2025 02:54
Co-authored-by: sheldonhull <3526320+sheldonhull@users.noreply.github.com>
Co-authored-by: sheldonhull <3526320+sheldonhull@users.noreply.github.com>
Copilot AI changed the title [WIP] Update chezmoi templating based on documentation improvements Add comprehensive chezmoi notes with modern templating best practices Nov 26, 2025
Copilot AI requested a review from sheldonhull November 26, 2025 02:57
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 13, 2026

Deploy Preview for sheldonhull ready!

Name Link
🔨 Latest commit 0ac4b49
🔍 Latest deploy log https://app.netlify.com/projects/sheldonhull/deploys/698eb780b5e0c60008e1ace4
😎 Deploy Preview https://deploy-preview-705--sheldonhull.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants