-
Notifications
You must be signed in to change notification settings - Fork 0
/
.chezmoi.yaml.tmpl
35 lines (31 loc) · 1.11 KB
/
.chezmoi.yaml.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{{/* boolean feature tags */}}
{{- $personal := false -}}{{/* true if this is my personal machine */}}
{{- $buildkite := false -}}{{/* true if this is my work machine */}}
{{- $email := promptString "Personal email" -}}
{{- $buildkiteEmail := "" -}}
{{/* Work around unreliable hostname on darwin */}}
{{- $hostname := .chezmoi.hostname -}}
{{- if eq .chezmoi.os "darwin" -}}
{{- $computerName := output "scutil" "--get" "ComputerName" | trim -}}
{{- if eq $computerName "Tim’s MacBook Air" -}}
{{- $hostname = "tims-mba" -}}
{{- else if eq $computerName "Tim’s BuildBook Pro" -}}
{{- $hostname = "buildkite-mbp" -}}
{{- else -}}
{{- $hostname = $computerName -}}
{{- end -}}
{{- end -}}
{{- if eq $hostname "tims-mba" -}}
{{- $personal = true -}}
{{- else if eq $hostname "buildkite-mbp" -}}
{{- $buildkite = true -}}
{{- $buildkiteEmail = promptString "Buildkite email" -}}
{{- end -}}
data:
hostname: {{ $hostname | quote }}
personal: {{ $personal }}
email: {{ $email | quote }}
buildkite: {{ $buildkite }}
{{- if $buildkite }}
buildkite_email: {{ $buildkiteEmail | quote }}
{{- end -}}