-
Notifications
You must be signed in to change notification settings - Fork 1
/
.chezmoi.toml.tmpl
84 lines (69 loc) · 2.5 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# -*-mode:toml-*- vim:ft=toml
# -*-mode:go-template-*- vim:ft=toml
# ~/.local/share/chezmoi/.chezmoi.toml.tmpl
# =============================================================================
# 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/
#
# This file supports Go's text/template language. */}}
{{ $codespaces := env "DEVPOD" | not | not -}}
sourceDir = {{ .chezmoi.sourceDir | quote }}
{{ $name := "" -}}
{{ $email := "" -}}
{{ $signingkey := "" -}}
{{ $colortheme := "" -}}
{{ $disable_bash_history := false -}}
{{- if $codespaces -}}
{{ $name = "Torgny Bjers" -}}
{{ $email = "[email protected]" -}}
{{ $signingkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBGLUiu8RUY+EXN2/7NqoIlr3iQAuJAXAukJgzJMWu5Z" -}}
{{ $colortheme = "gruvbox-dark" -}}
{{- else if stdinIsATTY -}}
{{ $name = promptStringOnce . "name" "Name" -}}
{{ $email = promptStringOnce . "email" "Email address" -}}
{{ $signingkey = promptStringOnce . "signingkey" "Signing key" -}}
{{ $themes := list "gruvbox-dark" "catppuccin-mocha" "eldritch" "dracula" "dracula-pro" -}}
{{ $defaultColorTheme := "gruvbox-dark" -}}
{{ $colortheme = promptChoiceOnce . "colortheme" "Color theme" $themes $defaultColorTheme -}}
{{ $disable_bash_history = promptBoolOnce . "disable_bash_history" "Disable bash history" false -}}
{{- end -}}
{{- $osid := .chezmoi.os -}}
{{- if hasKey .chezmoi.osRelease "id" -}}
{{- $osid = printf "%s-%s" .chezmoi.os .chezmoi.osRelease.id -}}
{{- end -}}
{{- if hasKey .chezmoi.osRelease "variant" -}}
{{- $osid = printf "%s-%s" .chezmoi.osRelease.id .chezmoi.osRelease.variant -}}
{{- end -}}
format = "json"
color = "on"
umask = 0o022
progress = false
[add]
secrets = "error"
[data]
codespaces = {{ $codespaces }}
email = {{ $email | quote }}
name = {{ $name | quote }}
signingkey = {{ $signingkey | quote }}
osid = {{ $osid | lower | quote }}
colortheme = {{ $colortheme | quote }}
disable_bash_history = {{ $disable_bash_history }}
[diff]
exclude = ["scripts"]
[github]
refreshPeriod = "300m"
[merge]
command = "nvim"
args = ["-d"]
[status]
exclude = ["scripts"]
[template]
options = ["missingkey=error"]
[update]
apply = false
[hooks.read-source-state.pre]
command = "{{ .chezmoi.sourceDir }}/.hook-scripts/pre-source-state.sh"