Skip to content

Commit d71bb7e

Browse files
committed
switch to machineType selector
1 parent e726baf commit d71bb7e

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

home/.chezmoi.toml.tmpl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
{{ $email := promptStringOnce . "email" "Email Address (Git, GPG, etc.)" -}}
2-
{{ $gitName := promptStringOnce . "gitName" "Name to use for git actions" -}}
3-
{{ $gitBranchPrefix := promptStringOnce . "gitBranchPrefix" "Prefix to apply to new git branches by default" -}}
4-
{{ $gitHooksPath := promptStringOnce . "gitHooksPath" "Custom core Git hooks path" -}}
5-
{{ $gui := promptBoolOnce . "gui" "Enable GUI options" -}}
1+
{{ $machineTypes := list "work" "personal" "other" -}}
2+
{{ $machineType := promptChoiceOnce . "machineType" "What type of machine is this" $machineTypes "other" -}}
3+
{{ $email := promptStringOnce . "email" "Email Address (Git, GPG, etc.)" "[email protected]" -}}
4+
{{ $gitName := promptStringOnce . "gitName" "Name to use for git actions" "linuxdaemon" -}}
5+
{{ $gitBranchPrefix := promptStringOnce . "gitBranchPrefix" "Prefix to apply to new git branches by default" "" -}}
6+
{{ $gitHooksPath := promptStringOnce . "gitHooksPath" "Custom core Git hooks path" "" -}}
7+
{{ $gui := promptBoolOnce . "gui" "Enable GUI options" false -}}
68
{{ $defaultPkgType := "brew" -}}
79
{{ if eq .chezmoi.os "linux" -}}
810
{{ $defaultPkgType = "apt" -}}
@@ -30,6 +32,6 @@
3032
gui = {{ $gui | toToml }}
3133
defaultPkgType = {{ $defaultPkgType | toToml }}
3234
useLinuxBrew = {{ $useLinuxBrew | toToml }}
33-
tags = {{ get $ "tags" | default list | toToml }}
3435
brewPrefix = {{ $brewPrefix | toToml }}
3536
gitBranchPrefix = {{ $gitBranchPrefix | toToml }}
37+
machineType = {{ $machineType | toToml }}

home/private_dot_zshrc.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ source_if_exists .aliases
4747
test -e "$HOME/.iterm2_shell_integration.zsh" && source "$HOME/.iterm2_shell_integration.zsh"
4848
{{ end -}}
4949

50-
{{ if has "personal" $.tags -}}
50+
{{ if eq $.machineType "personal" -}}
5151
hash -d Documents="$HOME/Library/CloudStorage/SynologyDrive-1/Documents"
5252
hash -d Code="$HOME/Library/CloudStorage/SynologyDrive-1/Documents/Code"
5353
{{ end -}}

0 commit comments

Comments
 (0)