generated from chezmoi/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.chezmoi.toml.tmpl
67 lines (50 loc) · 1.74 KB
/
.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{{- $is_wsl := false }}
{{ if eq .chezmoi.os "linux" }}
{{ if (.chezmoi.kernel.osrelease | lower | contains "microsoft") }}
{{- $is_wsl = true}}
{{ end }}
{{ end }}
{{- /* Checks if running interactively, which is not the case for GitHub Codespaces */ -}}
{{- $interactive := stdinIsATTY -}}
{{- /* Initializes the name variable with a default value */ -}}
{{- $name := "Jack Platten" -}}
{{- /* If name was previously set, reuses it */ -}}
{{- if hasKey . "name" -}}
{{- $name = .name -}}
{{- /* Otherwise, if running interactively, prompts for a name */ -}}
{{- else if $interactive -}}
{{- $name = promptString "name" $name -}}
{{- end -}}
{{- /* Does the same for the email */ -}}
{{- $email := "jack@platten.me" -}}
{{- if hasKey . "email" -}}
{{- $email = .email -}}
{{- else if $interactive -}}
{{- $email = promptString "email" $email -}}
{{- end -}}
{{- $signingkey := "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHGminsJAXUJkc7TH7qHU6RNdZuMcWIwdx+zZCDpDiUG" -}}
{{- if $interactive -}}
{{- writeToStdout "💡 Tip: you can re-enter your name and email with `chezmoi init --data=false`.\n" -}}
{{- end -}}
{{ $computerName := .chezmoi.hostname }}
{{- if eq .chezmoi.os "darwin" -}}
{{ $computerName = output "scutil" "--get" "ComputerName" | trim }}
{{ end -}}
sourceDir = "{{ .chezmoi.sourceDir }}"
[data]
name = "{{ $name }}"
email = "{{ $email }}"
is_wsl = {{ $is_wsl }}
computer_name = "{{ $computerName }}"
os = "{{ .chezmoi.os }}"
signingkey = "{{ $signingkey }}"
[git]
autoCommit = true
[edit]
command = "code"
args = ["--wait"]
{{- if eq .chezmoi.os "darwin" }}
[merge]
command = "ksdiff"
args = ["--merge", "--output", "{{"{{ .Source }}"}}", "{{"{{ .Destination }}"}}","{{"{{ .Target }}"}}"]
{{- end }}