diff --git a/.chezmoidata/packages.toml b/.chezmoidata/packages.toml index 7d99e18..49ed1c7 100644 --- a/.chezmoidata/packages.toml +++ b/.chezmoidata/packages.toml @@ -33,16 +33,20 @@ casks = [ # Debain 12 (bookworm) 沒有ueberzugpp,但是有ueberzug # Debain 12 (bookworm) neovim版本太舊 0.7,lazy無法用,故在shell腳本特殊處理 [packages.linux.debian] +apt_12 = [ + 'exa', +] + apt = [ 'sudo', 'zsh', 'vim', 'git', - 'exa', 'gcc', ] apt_13 = [ + 'eza', 'neovim', 'lazygit', ] diff --git a/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl b/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl index 9e9cfc4..07cfa69 100644 --- a/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl +++ b/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl @@ -9,6 +9,8 @@ {{- $aptInstall := .packages.linux.debian.apt -}} {{- if eq .chezmoi.osRelease.versionCodename "trixie" -}} {{- $aptInstall := concat .packages.linux.debian.apt .packages.linux.debian.apt_13 -}} +{{ else if and (eq .chezmoi.osRelease.id "debian") (hasKey .chezmoi.osRelease "versionID") (le .chezmoi.osRelease.versionID 12) }} +{{- $aptInstall := concat .packages.linux.debian.apt .packages.linux.debian.apt_12 -}} {{- end -}} apt_packages=( {{ $aptInstall | quoteList | join " " }} )