add windows git config

This commit is contained in:
reeink 2024-03-08 22:10:00 +08:00
parent 6d8603f31f
commit a1cc013f52
No known key found for this signature in database
5 changed files with 23 additions and 0 deletions

4
.chezmoidata/git.toml Normal file
View file

@ -0,0 +1,4 @@
[git.reeink]
name = "reeink"
email = "hi@ree.ink"
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMsVXzD7GxpLIF1uZTq9TTzIAdq5xM+5MTaJJuzE+3cf"

View file

@ -0,0 +1,10 @@
[gpg]
format = ssh
[gpg "ssh"]
program = {{ .chezmoi.homeDir | replaceAllRegex "/" "\\\\" -}}\\AppData\\Local\\1Password\\app\\8\\op-ssh-sign.exe
[commit]
gpgsign = true
[user]
signingkey = {{ .git.reeink.publicKey }}
name = {{ .git.reeink.name }}
email = {{ .git.reeink.email }}

View file

9
dot_gitconfig.tmpl Normal file
View file

@ -0,0 +1,9 @@
{{- if eq .chezmoi.os "windows" -}}
{{- template "dot_gitconfig_windows.tmpl" . -}}
{{- else if eq .chezmoi.os "linux" -}}
{{- if (.chezmoi.kernel.osrelease | lower | contains "microsoft") -}}
{{- template "dot_gitconfig_wsl.tmpl" . -}}
{{- else -}}
{{- template "dot_gitconfig_linux.tmpl" . -}}
{{- end -}}
{{- end -}}