[nvim] Switch from Mason to Chezmoi

This commit is contained in:
aloslider
2026-04-21 03:42:54 +03:00
parent e70c3138ce
commit 6c16b57f3b
19 changed files with 83 additions and 140 deletions
+39
View File
@@ -0,0 +1,39 @@
#!/bin/bash
{{ if eq .chezmoi.osRelease.id "nixos" }}
exit 0
{{ end }}
set -euo pipefail
echo "Installing and updating packages..."
{{ if eq .chezmoi.osRelease.idLike "arch" }}
sudo pacman -Sy --noconfirm
pkgs=()
{{ range .packages.arch }}
if ! pacman -Q "{{ . }}" &>/dev/null; then
pkgs+=("{{ . }}")
fi
{{ end }}
if [[ ${#pkgs[@]} -gt 0 ]]; then
echo "Installing pacman packages"
sudo pacman -S --noconfirm --needed "${pkgs[@]}"
fi
aur_pkgs=()
{{ range .packages.aur }}
if ! pacman -Q "{{ . }}" &>/dev/null; then
aur_pkgs+=("{{ . }}")
fi
{{ end }}
if [[ ${#aur_pkgs[@]} -gt 0 ]]; then
echo "Installing AUR packages"
paru -S --noconfirm --needed "${aur_pkgs[@]}"
fi
{{ end }}
echo "Done"