Skip to content

Instantly share code, notes, and snippets.

@bsag
Created August 3, 2026 14:51
Show Gist options
  • Select an option

  • Save bsag/38ed2ede4bf7e3707878f21994a4567b to your computer and use it in GitHub Desktop.

Select an option

Save bsag/38ed2ede4bf7e3707878f21994a4567b to your computer and use it in GitHub Desktop.
Chezmoi configuration examples
{{- $arm := false }}{{/* are we running on intel or arm processor? */}}
{{- if eq .chezmoi.os "darwin" -}}
{{- if contains "arm" (output "uname" "-p" | trim) -}}
{{- $arm = true -}}
{{- end -}}
{{- end -}}
[data]
arm = {{ $arm }}
{{- if .arm }}
eval "$(/opt/homebrew/bin/brew shellenv)"
{{ else }}
eval "$(/usr/local/bin/brew shellenv)"
{{- end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment