chore(packages): declare every tool the configs reference

Audit of configs, scripts, tmux-palette items and television cables
against installed packages. Adds the missing pacman/AUR/brew entries,
a [omarchy] repo list installed only where that repo is configured,
and cargo installs in 40-post. 10-packages filters lists with pacman -T
so provider packages (mise-bin, yazi-git) are not replaced, and uses
yay with paru as fallback. noctalia-shell -> noctalia-git (AUR name).
This commit is contained in:
Prad Nukala committed 2026-10-16 12:01:52 -04:00
1 parent 6f73aa2f82
commit 30314160f1
13 files changed
+156 -46

No files matched your search

@@ -6,26 +6,37 @@ set -eu
{{ if eq .chezmoi.os "linux" -}}
if [ "$(id -u)" -eq 0 ]; then PACMAN="pacman"; else PACMAN="sudo pacman"; fi
# shellcheck disable=SC2086 # word splitting intended
$PACMAN -S --needed --noconfirm \
{{ range .packages.arch.pacman }} {{ . }} \
{{ end }} && true
# Install only what no installed package already provides (`pacman -T`), so a
# machine with mise-bin or yazi-git is not asked to replace them with mise/yazi.
install_missing() {
missing=$(pacman -T "$@" || true)
# shellcheck disable=SC2086 # word splitting intended
[ -z "$missing" ] || $PACMAN -S --needed --noconfirm $missing
}
install_missing {{ range .packages.arch.pacman }}{{ . }} {{ end }}
{{ if or (eq .role "desktop") (eq .role "laptop") -}}
$PACMAN -S --needed --noconfirm \
{{ range .packages.arch.desktop.pacman }} {{ . }} \
{{ end }} && true
install_missing {{ range .packages.arch.desktop.pacman }}{{ . }} {{ end }}
# [omarchy] repo packages — only where pacman.conf has that repo
if pacman-conf -l | grep -qx omarchy; then
install_missing {{ range .packages.arch.desktop.omarchy }}{{ . }} {{ end }}
fi
aur_pkgs="{{ range .packages.arch.desktop.aur }}{{ . }} {{ end }}{{ range .packages.arch.aur }}{{ . }} {{ end }}"
{{ else -}}
aur_pkgs="{{ range .packages.arch.aur }}{{ . }} {{ end }}"
{{ end -}}
if [ -n "$(echo "$aur_pkgs" | tr -d ' ')" ]; then
if command -v paru >/dev/null 2>&1; then
if command -v yay >/dev/null 2>&1; then AUR="yay"
elif command -v paru >/dev/null 2>&1; then AUR="paru"
else AUR=""; fi
if [ -n "$AUR" ]; then
# shellcheck disable=SC2086
paru -S --needed --noconfirm $aur_pkgs
$AUR -S --needed --noconfirm $aur_pkgs
else
echo "warning: paru not found — skipping AUR packages: $aur_pkgs" >&2
echo "warning: yay/paru not found — skipping AUR packages: $aur_pkgs" >&2
fi
fi