-
Notifications
You must be signed in to change notification settings - Fork 1
/
.chezmoi.yaml.tmpl
50 lines (48 loc) · 1.89 KB
/
.chezmoi.yaml.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
{{- $passphrase := (env "DOTFILES_PASSPHRASE" | trim) -}}
{{- if eq $passphrase "" -}}
{{- if stdinIsATTY -}}
{{- $passphrase = promptStringOnce . "passphrase" "What is your dotfiles passphrase" -}}
{{- else -}}
{{- $passphrase = "HEY, YOU NEED TO PUT YOUR DOTFILES_PASSPHRASE HERE - YOU CAN ALSO SET THE DOTFILES_PASSPHRASE ENV VAR AND RE-INIT" -}}
{{- end -}}
{{- end -}}
{{- $personalMachine := false -}}
{{- if eq (env "PERSONAL_MACHINE" | trim) "" -}}
{{- if stdinIsATTY -}}
{{- $personalMachine = promptBoolOnce . "personalMachine" "Is this a personal machine (y/n)" -}}
{{- end -}}
{{- else -}}
{{- $personalMachine = eq (env "PERSONAL_MACHINE" | trim) "true" -}}
{{- end -}}
encryption: gpg
gpg:
symmetric: true
args:
- --batch
- --passphrase
- {{ $passphrase | quote }}
- --no-symkey-cache
- --quiet
git:
autoCommit: true
data:
is_personal_machine: {{ $personalMachine }}
is_linux: {{ eq .chezmoi.os "linux" }}
is_mac: {{ eq .chezmoi.os "darwin" }}
is_popos: {{ contains "Pop!_OS" ( dig "osRelease" "name" "" .chezmoi ) }}
is_ubuntu: {{ contains "Ubuntu" ( dig "osRelease" "name" "" .chezmoi ) }}
is_containerized: {{ eq (env "IN_CONTAINER" | trim) "true" }}
is_cloud: {{ eq (env "IN_CLOUD_IDE" | trim) "true" }}
is_codespaces: {{ eq (env "CODESPACES" | trim) "true" }}
is_remote_container: {{ eq (env "REMOTE_CONTAINERS" | trim) "true" }}
is_gitpod: {{ eq (env "GITPOD" | trim) "true" }}
standard_dirs:
code: {{ env "SD_CODE" | trim }}
npm_install: {{ env "SD_NPM_INSTALL" | trim }}
pnpm_install: {{ env "SD_PNPM_INSTALL" | trim }}
dot_dots: {{ env "SD_DOT_DOTS" | trim }}
dot_dots_apps: {{ env "SD_DOT_DOTS_APPS" | trim }}
dot_dots_settings: {{ env "SD_DOT_DOTS_SETTINGS" | trim }}
local_bin: {{ env "SD_LOCAL_BIN" | trim }}
local_share_apps: {{ env "SD_LOCAL_SHARE_APPS" | trim }}
dotfiles: {{ env "SD_DOTFILES" | trim }}