-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
.chezmoi.yaml.tmpl
71 lines (67 loc) · 2.13 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{{- /* Checks if running interactively */ -}}
{{- $interactive := stdinIsATTY -}}
{{- /* Template file for chezmoi config file */ -}}
{{- $headless := false -}}{{/* true if this machine does not have a screen and keyboard */}}
{{- $kubernetes := false -}}{{/* true if this machine is used for Kubernetes work */}}
{{- $i3wm := false -}}{{/* true if this machine is using i3wm */}}
{{- $swaywm := false -}}{{/* true if this machine is using swaywm */}}
{{- $hyprlandwm := false -}}{{/* true if this machine is using hyprlandwm */}}
{{- $agekey := false -}}{{/* true if this machine has agekey to decrypt secret */}}
{{- $hostname := .chezmoi.hostname -}}
{{- if eq $hostname "budimanjojo-main" -}}
{{- $headless = false -}}
{{- $kubernetes = true -}}
{{- $i3wm = false -}}
{{- $swaywm = true -}}
{{- $hyprlandwm = true -}}
{{- $agekey = true -}}
{{- end -}}
{{- if eq $hostname "budimanjojo-ubuntu" -}}
{{- $headless = false -}}
{{- $kubernetes = true -}}
{{- $i3wm = false -}}
{{- $swaywm = false -}}
{{- $hyprlandwm = false -}}
{{- $agekey = true -}}
{{- end -}}
{{- if hasKey . "headless" -}}
{{- $headless = .headless -}}
{{- else if $interactive -}}
{{- $headless = promptBool "headless" -}}
{{- end -}}
{{- if hasKey . "kubernetes" -}}
{{- $kubernetes = .kubernetes -}}
{{- else if $interactive -}}
{{- $kubernetes = promptBool "kubernetes" -}}
{{- end -}}
{{- if hasKey . "agekey" -}}
{{- $agekey = .agekey -}}
{{- else if $interactive -}}
{{- $agekey = promptBool "agekey" -}}
{{- end -}}
{{- if $interactive -}}
{{- writeToStdout "💡 Tip: you can re-enter your data with `chezmoi init --data=false`.\n" -}}
{{- end -}}
data:
headless: {{ $headless }}
kubernetes: {{ $kubernetes }}
i3wm: {{ $i3wm }}
swaywm: {{ $swaywm }}
hyprlandwm: {{ $hyprlandwm }}
agekey: {{ $agekey }}
format: yaml
encryption: age
{{- if $agekey }}
age:
identity: /home/budiman/.config/sops/age/keys.txt
recipient: age1zeqkpfz7e3s207ynea0z0auc0mrct0pc7w4sh6j3d0c4qac3dahqj9ufdg
{{- end }}
merge:
command: nvim
args:
- -d
- "{{ "{{ .Destination }}" }}"
- "{{ "{{ .Source }}" }}"
- "{{ "{{ .Target }}" }}"
git:
autoAdd: true