-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.chezmoi.yaml.tmpl
34 lines (28 loc) · 975 Bytes
/
.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
{{ $email := promptStringOnce . "email" "Email address" "[email protected]" -}}
{{ $name := promptStringOnce . "name" "Full name" "Latif Sulistyo" -}}
{{ $isServer := false -}}
{{ $isWSL := (.chezmoi.kernel.osrelease | lower | contains "microsoft") -}}
{{- if eq .chezmoi.os "linux" -}}
{{- if not $isWSL -}}
{{- $chassis := output "hostnamectl" "chassis" | trim -}}
{{- if eq $chassis "server" -}}
{{- $isServer = true -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{ $isNoGUI := or (eq .chezmoi.os "android") $isServer $isWSL -}}
{{ $isGUI := and (not $isNoGUI) (eq .chezmoi.os "linux") -}}
progress: true
diff:
pager: delta
command: delta
args: ["--paging", "never"]
exclude: [dirs, scripts]
data:
email: {{ $email }}
name: {{ $name }}
is_no_gui: {{ $isNoGUI }}
is_linux_gui: {{ $isGUI }}
is_server: {{ $isServer }}
is_wsl: {{ $isWSL }}
is_arch_linux: {{ not (not (and (eq .chezmoi.os "linux") (lookPath "pacman"))) }}