Files
dotfiles/.chezmoi.toml.tmpl
2026-08-14 19:11:23 +02:00

26 lines
1.1 KiB
Cheetah

# Check if this runs in an ephemeral container, e.g. builder, devcontainer, etc.
{{- $ephemeralOverride := env "CHEZMOI_EPHEMERAL" -}}
{{- $ephemeral := or (eq $ephemeralOverride "1") (eq $ephemeralOverride "true") -}}
{{- if not $ephemeralOverride -}}
{{- $ephemeral = or (not stdinIsATTY) (ne (env "CODESPACES") "") (eq .chezmoi.username "vscode") -}}
{{- end -}}
{{- $github_email := "" -}}
{{- $machineClass := "" -}}
{{- if $ephemeral -}}
{{- $github_email = env "CHEZMOI_GITHUB_EMAIL" -}}
{{- $machineClass = env "CHEZMOI_MACHINE_CLASS" | default "public" -}}
{{- else -}}
{{- $github_email = promptStringOnce . "github_email" "Github Email address" -}}
{{- $machineClass = promptChoiceOnce . "machineClass" "Machine class (private/server/public)" (list "private" "server" "public") -}}
{{- end -}}
encryption = "age"
[age]
identity = "~/.config/chezmoi/key.txt"
recipient = "age1q8r0dfsjadzq8fy6453acvurhzt7ndptyur0xrkwfh76tx7fwyks3lxp42"
[data]
github_email = {{ $github_email | quote }}
machineClass = {{ $machineClass | quote }}
ephemeral = {{ $ephemeral }}