From a4e2eadbe9e2a471ece2b07120dec40f0bafa196 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Mon, 3 Aug 2026 22:28:22 +0200 Subject: [PATCH] feat(mise): Allow to declare bootstrap package per host Whitout this, you can only specify packages per os (distrib). --- .chezmoidata/hosts.yaml | 4 ++++ .chezmoitemplates/mise-bootstrap-packages | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/.chezmoidata/hosts.yaml b/.chezmoidata/hosts.yaml index b2c9701..11d9fa9 100644 --- a/.chezmoidata/hosts.yaml +++ b/.chezmoidata/hosts.yaml @@ -55,6 +55,8 @@ hosts: configs: {} # Termux (application de terminal pour android) termux-debian: + packages: + - apt:zsh users: root: toolboxes: @@ -65,6 +67,8 @@ hosts: - terminal - dev-tools termux-ubuntu: + packages: + - apt:zsh users: root: toolboxes: diff --git a/.chezmoitemplates/mise-bootstrap-packages b/.chezmoitemplates/mise-bootstrap-packages index d68481c..52c8a20 100644 --- a/.chezmoitemplates/mise-bootstrap-packages +++ b/.chezmoitemplates/mise-bootstrap-packages @@ -41,3 +41,15 @@ {{- 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 }}