-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_gitconfig.tmpl
More file actions
55 lines (43 loc) · 1.2 KB
/
Copy pathdot_gitconfig.tmpl
File metadata and controls
55 lines (43 loc) · 1.2 KB
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
[user]
name = {{ index . "name" | default "Matthew Kelch" }}
email = {{ .email }}
{{- if ne .signingMethod "none" }}
signingKey = {{ .signingKey }}
{{- end }}
[init]
defaultBranch = main
[push]
autoSetupRemote = true
{{- if ne .signingMethod "none" }}
[gpg]
format = {{ .signingMethod }}
[commit]
gpgsign = true
{{- end }}
{{- if and (eq .signingMethod "ssh") (eq .chezmoi.os "darwin") }}
[gpg "ssh"]
program = /Applications/1Password.app/Contents/MacOS/op-ssh-sign
{{- end }}
{{- if and (eq .signingMethod "ssh") (eq .chezmoi.os "windows") }}
{{- $opSSHSign := "" -}}
{{- range list
"C:/Program Files/1Password/app/8/op-ssh-sign.exe"
(joinPath .chezmoi.homeDir "AppData/Local/Microsoft/WindowsApps/op-ssh-sign.exe") -}}
{{- if and (not $opSSHSign) (stat .) -}}
{{- $opSSHSign = . -}}
{{- end -}}
{{- end }}
{{- if $opSSHSign }}
[gpg "ssh"]
program = {{ $opSSHSign | replace "\\" "/" }}
{{- else }}
# WARNING: op-ssh-sign not found. Install 1Password and re-run chezmoi apply.
{{- end }}
{{- end }}
{{- if eq .chezmoi.os "windows" }}
[credential]
helper = manager
[core]
autocrlf = input
sshCommand = C:/Windows/System32/OpenSSH/ssh.exe
{{- end }}