From 992d1f0bbb3abc797f3bb02068ebdd2fedf7a9af Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Wed, 23 Apr 2025 20:13:59 +0800 Subject: [PATCH] add linux packages --- .chezmoidata/packages.toml | 26 +++++++++++++++++++ ...n_onchange_darwin-install-packages.sh.tmpl | 2 +- ...un_onchange_linux-install-packages.sh.tmpl | 19 ++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) rename run_onchange_darwin-install-packages.sh.tmpl => .chezmoiscripts/run_onchange_darwin-install-packages.sh.tmpl (97%) create mode 100644 .chezmoiscripts/run_onchange_linux-install-packages.sh.tmpl diff --git a/.chezmoidata/packages.toml b/.chezmoidata/packages.toml index 480c999..e0be8c9 100644 --- a/.chezmoidata/packages.toml +++ b/.chezmoidata/packages.toml @@ -2,11 +2,13 @@ brews = [ 'chezmoi', 'git', + 'zsh', 'vim', 'lsix', 'eza', 'grc', 'zellij', + 'ranger', 'cmake', 'python', 'go', @@ -18,4 +20,28 @@ casks = [ 'iterm2', 'alacritty', 'macvim', +] + +[packages.linux.manjaro] +pacman = [ + 'chezmoi', + 'yay', + 'base-devel', + 'fakeroot', + 'gcc', + 'cmake', + 'lsix', + 'eza', + 'grc', + 'zellij', + 'ranger', + 'gvim', + 'python', + 'go', + 'nodejs', + 'jdk-openjdk', +] + +aur = [ + 'alacritty-sixel-git', ] \ No newline at end of file diff --git a/run_onchange_darwin-install-packages.sh.tmpl b/.chezmoiscripts/run_onchange_darwin-install-packages.sh.tmpl similarity index 97% rename from run_onchange_darwin-install-packages.sh.tmpl rename to .chezmoiscripts/run_onchange_darwin-install-packages.sh.tmpl index 4d96f57..1e53bde 100644 --- a/run_onchange_darwin-install-packages.sh.tmpl +++ b/.chezmoiscripts/run_onchange_darwin-install-packages.sh.tmpl @@ -1,5 +1,5 @@ {{ if eq .chezmoi.os "darwin" -}} -#!/bin/bash +#!/bin/sh # Install Homebrew command -v brew >/dev/null 2>&1 || \ diff --git a/.chezmoiscripts/run_onchange_linux-install-packages.sh.tmpl b/.chezmoiscripts/run_onchange_linux-install-packages.sh.tmpl new file mode 100644 index 0000000..d68f4eb --- /dev/null +++ b/.chezmoiscripts/run_onchange_linux-install-packages.sh.tmpl @@ -0,0 +1,19 @@ +{{ if eq .chezmoi.os "linux" -}} + + +{{ if eq .chezmoi.osRelease.id "manjaro" -}} +#!/usr/bin/env bash + + +{{ range .packages.linux.manjaro.pacman -}} +sudo pacman -S --needed --noconfirm {{ . | quote }} +{{ end -}} + +{{ range .packages.linux.manjaro.aur -}} +yay -S --needed --noconfirm {{ . | quote }} +{{ end -}} + +{{ end -}} + + +{{ end -}} \ No newline at end of file