-
Notifications
You must be signed in to change notification settings - Fork 0
/
.chezmoi.toml.tmpl
36 lines (29 loc) · 1014 Bytes
/
.chezmoi.toml.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
36
{{- $git_user := promptString "git_user" -}}
{{- $git_email := promptString "git_email" -}}
{{- $isLinux := eq .chezmoi.os "linux" }}
{{- $isWSL := and $isLinux (.chezmoi.kernel.osrelease | lower | contains "microsoft") (ne .chezmoi.fqdnHostname .chezmoi.hostname) }}
{{- $isWin := eq .chezmoi.os "windows" }}
{{- $isMac := eq .chezmoi.os "darwin" }}
{{- $isLocal := or $isMac $isWSL }}
{{- $isGUI := or $isMac $isWin }}
{{- $isWork := eq $git_user ($git_email | splitList "@" | first) }}
{{- $win_user := "" -}}
{{- if or $isWSL $isWin }}
{{- $win_user = promptString "win_user" -}}
{{- end -}}
[data]
isWSL = {{ $isWSL }}
isLinux = {{ $isLinux }}
isMac = {{ $isMac }}
isWork = {{ $isWork }}
isWin = {{ $isWin }}
isLocal = {{ $isLocal }}
isGUI = {{ $isGUI }}
git_user = "{{ $git_user }}"
git_email = "{{ $git_email }}"
{{- if or $isWSL $isWin }}
win_user = "{{ $win_user }}"
{{- end }}
[merge]
command = "nvim"
args = ["-d", "{{`{{ .Destination }}`}}", "{{`{{ .Source }}", "{{ .Target }}`}}"]