-
Notifications
You must be signed in to change notification settings - Fork 0
/
.chezmoi.toml.tmpl
61 lines (52 loc) · 2.21 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
# Used to customize configuration when doing a `chezmoi init`.
#
# This template file will trigger prompts to fill-in machine-specific
# templateable values. The resulting file is then created at
# `~/.config/chezmoi/chezmoi.toml`
# See https://www.chezmoi.io/docs/how-to/
{{- $email := promptStringOnce . "email" "Git email address for the author/committer" }}
{{- $rawScale := promptStringOnce . "rawScale" "Display scaling on this device" "100%" }}
{{- $location := promptStringOnce . "location" "Location to show weather for" "Maidenhead" }}
{{- $personal := promptBoolOnce . "personal" "Install personal packages" }}
{{- $chassisType := "desktop" }}
{{- if eq .chezmoi.os "darwin" }}
{{- if contains "MacBook" (output "sysctl" "-n" "hw.model") }}
{{- $chassisType = "laptop" }}
{{- else }}
{{- $chassisType = "desktop" }}
{{- end }}
{{- else if eq .chezmoi.os "linux" }}
{{- $chassisType = (output "hostnamectl" "--json=short" | mustFromJson).Chassis }}
{{- else if eq .chezmoi.os "windows" }}
{{- $chassisType = (output "powershell.exe" "-NoProfile" "-NonInteractive" "-Command" "if ((Get-CimInstance -Class Win32_Battery | Measure-Object).Count -gt 0) { Write-Output 'laptop' } else { Write-Output 'desktop' }") | trim }}
{{- end }}
encryption = "age"
[age]
identity = "~/.keys/chezmoi.txt"
recipient = "age1854gyefj8vf0qzpfxldjzremfg69fmawcmgwnve8d4equgvl99qslgywr8"
[data]
chassisType = {{ $chassisType | quote }}
email = {{ $email | quote }}
font = "MesloLGS NF"
location = {{ $location | quote }}
personal = {{ $personal }}
rawScale = {{ $rawScale | quote }}
scale = {{ divf (trimSuffix "%" $rawScale) 100 }}
[diff]
pager = "less -FR"
[hooks.read-source-state.pre]
{{ if eq .chezmoi.os "windows" -}}
command = "pwsh"
args = [{{ joinPath .chezmoi.sourceDir ".install-password-manager.ps1" | quote }}, "-Version", {{ (gitHubLatestRelease "Dashlane/dashlane-cli").TagName | quote }}]
{{ else -}}
command = {{ joinPath .chezmoi.sourceDir ".install-password-manager.sh" | quote }}
args = [{{ (gitHubLatestRelease "Dashlane/dashlane-cli").TagName | quote }}]
{{- end }}
{{ if eq .chezmoi.os "windows" -}}
[interpreters.ps1]
command = "pwsh"
args = ["-NoLogo"]
{{- end }}
[scriptEnv]
GUM_LOG_MESSAGE_FOREGROUND = "2"
# vim:ft=toml