56 lines
1.3 KiB
Plaintext
56 lines
1.3 KiB
Plaintext
{{/* .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 -}}
|
|
|
|
{{/* Debian */}}
|
|
{{- if and (eq .chezmoi.os "linux") (hasKey .chezmoi "osRelease") (eq .chezmoi.osRelease.id "debian") -}}
|
|
|
|
# Debian common
|
|
{{- range .packages.debian.common }}
|
|
"apt:{{- . }}" = "latest"
|
|
{{- end }}
|
|
{{- end -}}
|
|
|
|
{{/* Ubuntu */}}
|
|
{{- 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 }}
|
|
|
|
{{/* Host specific */}}
|
|
{{- $hostname := output "hostname" | trim -}}
|
|
{{- $currentHost := index .hosts $hostname -}}
|
|
{{- if $currentHost }}
|
|
{{- if hasKey $currentHost "packages" }}
|
|
# Paquets personnalisés pour l'hôte {{ $hostname }}
|
|
{{- range $currentHost.packages }}
|
|
"{{- . }}" = "latest"
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|