-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.chezmoi.toml.tmpl
31 lines (29 loc) · 1.42 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
{{- $sharedMachine := promptString "Is this a shared machine (y/n)" -}}
{{- $fullname := "" -}}
{{- $email := "" -}}
{{- $githubUsername := "" -}}
{{- $gpgKey1PasswordUUID := "" -}}
{{- $gpgFingerprint1PasswordUUID := "" -}}
{{- $gpgSSHPrivateKey1PasswordUUID := "" -}}
{{- $gpgSSHPublicKey1PasswordUUID := "" -}}
{{- if ne $sharedMachine "y" -}}
{{- $fullname = promptString "Full Name" -}}
{{- $email = promptString "Email" -}}
{{- $githubUsername = promptString "GitHub Username" -}}
{{- $gpgKey1PasswordUUID = promptString "1Password UUID of GPG key" -}}
{{- $gpgFingerprint1PasswordUUID = promptString "1Password UUID of GPG fingerprint" -}}
{{- $gpgSSHPrivateKey1PasswordUUID = promptString "1Password UUID of SSH private key" -}}
{{- $gpgSSHPublicKey1PasswordUUID = promptString "1Password UUID of SSH public key" -}}
{{- end -}}
[data]
shared_machine = {{ eq $sharedMachine "y" }}
{{- if ne $sharedMachine "y" }}
fullname = "{{ $fullname }}"
email = "{{ $email }}"
github_username = "{{ $githubUsername }}"
gpg_key_1password_uuid = "{{ $gpgKey1PasswordUUID }}"
gpg_fingerprint_1password_uuid = "{{ $gpgFingerprint1PasswordUUID }}"
gpg_fingerprint = "{{ (onepasswordDetailsFields $gpgFingerprint1PasswordUUID).password.value }}"
ssh_private_key_1password_uuid = "{{ $gpgSSHPrivateKey1PasswordUUID }}"
ssh_public_key_1password_uuid = "{{ $gpgSSHPublicKey1PasswordUUID -}}"
{{- end }}