-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.chezmoi.yaml.tmpl
More file actions
32 lines (28 loc) · 834 Bytes
/
Copy path.chezmoi.yaml.tmpl
File metadata and controls
32 lines (28 loc) · 834 Bytes
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
{{- /* Checks if running interactively */ -}}
{{- $interactive := stdinIsATTY -}}
{{- /* Template file for chezmoi config file */ -}}
{{- $headless := false -}}{{/* true if this machine does not have a screen and keyboard */}}
{{- $hostname := .chezmoi.hostname -}}
{{- if eq $hostname "bean-machine" -}}
{{- $headless = true -}}
{{- end -}}
{{- if hasKey . "headless" -}}
{{- $headless = .headless -}}
{{- else if $interactive -}}
{{- $headless = promptBool "headless" -}}
{{- end -}}
{{- if $interactive -}}
{{- writeToStdout "💡 Tip: you can re-enter your data with `chezmoi init --data=false`.\n" -}}
{{- end -}}
data:
headless: {{ $headless }}
format: yaml
merge:
command: nvim
args:
- -d
- "{{ "{{ .Destination }}" }}"
- "{{ "{{ .Source }}" }}"
- "{{ "{{ .Target }}" }}"
git:
autoAdd: true