Compare commits

..

2 Commits

Author SHA1 Message Date
00deaaa6b5 refactor before_linux-install-packages.sh 2025-05-02 13:49:16 +08:00
89eafc01e2 fix packages list 2025-05-02 13:41:02 +08:00
2 changed files with 48 additions and 10 deletions

View File

@ -1,3 +1,4 @@
# macOS ------------------------------------------------------------------------
[packages.darwin] [packages.darwin]
brews = [ brews = [
'chezmoi', 'chezmoi',
@ -25,6 +26,37 @@ casks = [
# 'macvim', # 'macvim',
] ]
# Arch Linux -------------------------------------------------------------------
[packages.linux.arch]
pacman_force = [
'archlinux-keyring',
'llvm',
'llvm-libs',
]
pacman = [
'chezmoi',
'git',
'base-devel',
'fakeroot',
'gcc',
'cmake',
'lsix',
'ueberzugpp',
'eza',
'grc',
'zellij',
'ranger',
'vim',
'neovim',
'python',
'go',
'nodejs',
'npm',
'jdk-openjdk',
]
# Manjaro Linux ----------------------------------------------------------------
[packages.linux.manjaro] [packages.linux.manjaro]
pacman_force = [ pacman_force = [
'archlinux-keyring', 'archlinux-keyring',
@ -36,11 +68,13 @@ pacman_force = [
pacman = [ pacman = [
'chezmoi', 'chezmoi',
'yay', 'yay',
'git',
'base-devel', 'base-devel',
'fakeroot', 'fakeroot',
'gcc', 'gcc',
'cmake', 'cmake',
'lsix', 'lsix',
'ueberzugpp',
'eza', 'eza',
'grc', 'grc',
'zellij', 'zellij',

View File

@ -1,7 +1,20 @@
{{ if eq .chezmoi.os "linux" -}} {{ if eq .chezmoi.os "linux" -}}
{{/* ==== Arch Linux / Manjaro ========================================== */ -}}
{{ if eq .chezmoi.osRelease.id "manjaro" -}} {{ if eq .chezmoi.osRelease.id "manjaro" -}}
{{/* ---- 整理待安裝清單 -------------------------------------------------- */ -}}
{{- $pacman_force := .packages.linux.manjaro.pacman_force -}}
{{- $pacmanInstall := .packages.linux.manjaro.pacman -}}
{{- $aurInstall := .packages.linux.manjaro.aur -}}
{{- if not .noGUI -}}
{{- $pacmanInstall := concat .packages.linux.manjaro.pacman .packages.linux.manjaro.pacman_gui -}}
{{- $aurInstall := concat .packages.linux.manjaro.aur .packages.linux.manjaro.aur_gui -}}
{{- end -}}
{{/* ---- 安裝腳本 ------------------------------------------------------- */ -}}
{{- /* https://github.com/mriehl/dotfiles/blob/master/run_onchange_packages.sh.tmpl */ -}} {{- /* https://github.com/mriehl/dotfiles/blob/master/run_onchange_packages.sh.tmpl */ -}}
#!/usr/bin/env bash #!/usr/bin/env bash
@ -34,15 +47,7 @@ wait_for_pacman_unlock() {
echo "✅ 鎖定解除,繼續執行。" echo "✅ 鎖定解除,繼續執行。"
} }
pacmanForce_packages=( {{.packages.linux.manjaro.pacman_force | quoteList | join " " }}) pacmanForce_packages=( {{ $pacman_force | quoteList | join " " }})
{{- $pacmanInstall := .packages.linux.manjaro.pacman -}}
{{- $aurInstall := .packages.linux.manjaro.aur -}}
{{ if not .noGUI }}
{{- $pacmanInstall := concat .packages.linux.manjaro.pacman .packages.linux.manjaro.pacman_gui -}}
{{- $aurInstall := concat .packages.linux.manjaro.aur .packages.linux.manjaro.aur_gui -}}
{{ end }}
pacman_packages=( {{ $pacmanInstall | quoteList | join " " }} ) pacman_packages=( {{ $pacmanInstall | quoteList | join " " }} )
aur_packages=( {{ $aurInstall | quoteList | join " " }}) aur_packages=( {{ $aurInstall | quoteList | join " " }})
@ -101,5 +106,4 @@ if [[ ${#to_install_aur[@]} -gt 0 ]]; then
fi fi
{{ end -}} {{ end -}}
{{ end -}} {{ end -}}