feat(mise): Automate ~/.config/mise/config.toml generation based on yaml data and some logic
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
{{/* .chezmoitemplates/mise-bootstrap-packages */}}
|
||||
{{- $isUbuntu := false -}}
|
||||
{{- $isUbuntuServer := false -}}
|
||||
{{- $isUbuntuDesktop := false -}}
|
||||
{{- if and (eq .chezmoi.os "linux") (hasKey .chezmoi "osRelease") (eq .chezmoi.osRelease.id "ubuntu") -}}
|
||||
{{- $isUbuntu = true -}}
|
||||
{{- if stat "/usr/bin/gnome-shell" }}
|
||||
{{- $isUbuntuDesktop = true -}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $isUbuntu }}
|
||||
|
||||
# Ubuntu common
|
||||
{{- range .packages.ubuntu.common }}
|
||||
"apt:{{- . }}" = "latest"
|
||||
{{- end }}
|
||||
|
||||
{{- if $isUbuntuServer }}
|
||||
# Ubuntu server
|
||||
{{- range .packages.ubuntu.server }}
|
||||
"apt:{{- . }}" = "latest"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if $isUbuntuDesktop }}
|
||||
# Ubuntu desktop
|
||||
{{- range .packages.ubuntu.desktop }}
|
||||
"apt:{{- . }}" = "latest"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user