-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.chezmoi.toml.tmpl
More file actions
41 lines (37 loc) · 1.29 KB
/
Copy path.chezmoi.toml.tmpl
File metadata and controls
41 lines (37 loc) · 1.29 KB
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
{{/* feature flags */}}
{{- $workmode := false -}}{{/* enable work configuration */}}
{{- $wsl := false -}}{{/* enable wsl specific features */}}
{{- $termux := false -}}{{/* enable termux specific features */}}
{{- $opmode := "account" -}}{{/* 1password mode: "account" for desktop app, "service" for service token */}}
{{- "" -}}
{{- $installEnv := "home" }}{{/* determine which programming languages (and versions) to sync with asdf */}}
{{- if eq .chezmoi.os "linux" -}}
{{- if eq .chezmoi.hostname "homeostasis" -}}
{{- $workmode = true -}}
{{- $installEnv = "work" -}}
{{- end -}}
{{- if (.chezmoi.kernel.osrelease | lower | contains "microsoft") -}}
{{- $wsl = true -}}
{{- end -}}
{{- end -}}
{{- if eq .chezmoi.os "darwin" -}}
{{- if or (eq .chezmoi.hostname "seiryu") (eq .chezmoi.hostname "dahak") -}}
{{- $workmode = true -}}
{{- $installEnv = "work" -}}
{{- end -}}
{{- end -}}
{{- if eq .chezmoi.os "android" -}}
{{- $opmode = "service" -}}
{{- end -}}
{{- if env "TERMUX_VERSION" -}}
{{- $termux = true -}}
{{- end -}}
[data]
machinename = "{{ .chezmoi.hostname }}"
installenv = "{{ $installEnv }}"
workmode = {{ $workmode }}
wsl = {{ $wsl }}
termux = {{ $termux }}
opmode = "{{ $opmode }}"
[onepassword]
mode = "{{ $opmode }}"