|
1 | 1 | {{ $email := promptStringOnce . "email" "Email Address (Git, GPG, etc.)" -}} |
2 | 2 | {{ $gitName := promptStringOnce . "gitName" "Name to use for git actions" -}} |
3 | 3 | {{ $gitHooksPath := promptStringOnce . "gitHooksPath" "Custom core Git hooks path" -}} |
4 | | -{{ $gui := promptBoolOnce . "gui" "Enable GUI options?" -}} |
| 4 | +{{ $gui := promptBoolOnce . "gui" "Enable GUI options" -}} |
5 | 5 | {{ $defaultPkgType := "brew" -}} |
6 | 6 | {{ if eq .chezmoi.os "linux" -}} |
7 | 7 | {{ $defaultPkgType = "apt" -}} |
8 | 8 | {{ end -}} |
9 | 9 | {{ $useLinuxBrew := false -}} |
10 | 10 | {{ if eq .chezmoi.os "linux" -}} |
11 | | -{{ $useLinuxBrew = promptBoolOnce . "useLinuxBrew" "Use LinuxBrew?" -}} |
| 11 | +{{ $useLinuxBrew = promptBoolOnce . "useLinuxBrew" "Use LinuxBrew" -}} |
| 12 | +{{ end -}} |
| 13 | + |
| 14 | +{{ $brewPrefix := "" -}} |
| 15 | +{{ if eq .chezmoi.os "darwin" -}} |
| 16 | +{{ if eq .chezmoi.arch "arm64" -}} |
| 17 | +{{ $brewPrefix = "/opt/homebrew" -}} |
| 18 | +{{ else -}} |
| 19 | +{{ $brewPrefix = "/usr/local" -}} |
| 20 | +{{ end -}} |
| 21 | +{{ else if and (eq .chezmoi.os "linux") $useLinuxBrew -}} |
| 22 | +{{ $brewPrefix = "/home/linuxbrew/.linuxbrew" -}} |
12 | 23 | {{ end -}} |
13 | 24 |
|
14 | 25 | [data] |
15 | | - email = {{ $email | quote }} |
16 | | - gitName = {{ $gitName | quote }} |
17 | | - gitHooksPath = {{ $gitHooksPath | quote }} |
18 | | - gui = {{ $gui }} |
19 | | - defaultPkgType = {{ $defaultPkgType | quote }} |
20 | | - useLinuxBrew = {{ $useLinuxBrew }} |
21 | | - tags = {{ get $ "tags" | default list | toToml -}} |
| 26 | + email = {{ $email | toToml }} |
| 27 | + gitName = {{ $gitName | toToml }} |
| 28 | + gitHooksPath = {{ $gitHooksPath | toToml }} |
| 29 | + gui = {{ $gui | toToml }} |
| 30 | + defaultPkgType = {{ $defaultPkgType | toToml }} |
| 31 | + useLinuxBrew = {{ $useLinuxBrew | toToml }} |
| 32 | + tags = {{ get $ "tags" | default list | toToml }} |
| 33 | + brewPrefix = {{ $brewPrefix | toToml }} |
0 commit comments