From 77a402600e68f8479f1ffc1a0ee1d6aa2b9b86bf Mon Sep 17 00:00:00 2001 From: Badstagram Date: Wed, 14 Jan 2026 15:13:02 +0000 Subject: [PATCH] chore(linux): install packages on apply --- .chezmoidata/packages.yaml | 24 +++++++++++++++++++ ...ange_aMacos-install-packages.sh copy.tmpl} | 0 ...run_onchange_arch-install-packages.sh.tmpl | 22 +++++++++++++++++ 3 files changed, 46 insertions(+) rename .chezmoiscripts/{run_onchange_aMacos-install-packages.sh.tmpl => run_onchange_aMacos-install-packages.sh copy.tmpl} (100%) create mode 100644 .chezmoiscripts/run_onchange_arch-install-packages.sh.tmpl diff --git a/.chezmoidata/packages.yaml b/.chezmoidata/packages.yaml index 6051aaa..33ed6f5 100644 --- a/.chezmoidata/packages.yaml +++ b/.chezmoidata/packages.yaml @@ -25,6 +25,30 @@ packages: - "fnm" - "gdu" - "hyfetch" + arch: + pacman: + - "alacritty" + - "bat" + - "bitwarden" + - "base-devel" + - "eza" + - "firefox" + - "git" + - "httpie" + - "hyfetch" + - "lazygit" + - "neovim" + - "opendoas" + - "tailscale" + - "vi" + - "vim" + aur: + - "beekeeper-studio" + - "discord-canary" + - "gitea-tea-git" + - "localsend-bin" + - "spotify" + - "visual-studio-code-bin" vscode: - "aaron-bond.better-comments" - "bbenoist.nix" diff --git a/.chezmoiscripts/run_onchange_aMacos-install-packages.sh.tmpl b/.chezmoiscripts/run_onchange_aMacos-install-packages.sh copy.tmpl similarity index 100% rename from .chezmoiscripts/run_onchange_aMacos-install-packages.sh.tmpl rename to .chezmoiscripts/run_onchange_aMacos-install-packages.sh copy.tmpl diff --git a/.chezmoiscripts/run_onchange_arch-install-packages.sh.tmpl b/.chezmoiscripts/run_onchange_arch-install-packages.sh.tmpl new file mode 100644 index 0000000..235ba40 --- /dev/null +++ b/.chezmoiscripts/run_onchange_arch-install-packages.sh.tmpl @@ -0,0 +1,22 @@ +{{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.idLike "arch")) -}} +#!/bin/bash + +_install_pacman_packages() { + pacman -S --needed {{ .packages.arch.pacman | join " " }} +} + +_install_yay() { + TMPDIR=$(mktemp -d) + git clone https://aur.archlinux.org/yay.git $TMPDIR + cd $TMPDIR/yay + makepkg -si + + yay -Y --gendb +} + +_install_pacman_packages() { + pacman -S --needed {{ .packages.arch.aur | join " " }} +} + + +{{ end -}} \ No newline at end of file