From 8120ca9476a338b1b09a7ec4e0913f928eda8461 Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Thu, 11 Jul 2024 23:11:26 -0400 Subject: [PATCH] Add home/.chezmoidata/packages.yaml Add home/.chezmoidata/units.yaml Add home/packages.sh Remove home/units.sh Add home/units.sh --- home/.chezmoidata/packages.yaml | 96 ++++++++++++++++++++++++++++++ home/.chezmoidata/units.yaml | 9 +++ home/run_onchange_packages.sh.tmpl | 19 ++++++ home/run_onchange_units.sh | 5 -- home/run_onchange_units.sh.tmpl | 10 ++++ 5 files changed, 134 insertions(+), 5 deletions(-) create mode 100644 home/.chezmoidata/packages.yaml create mode 100644 home/.chezmoidata/units.yaml create mode 100644 home/run_onchange_packages.sh.tmpl delete mode 100644 home/run_onchange_units.sh create mode 100644 home/run_onchange_units.sh.tmpl diff --git a/home/.chezmoidata/packages.yaml b/home/.chezmoidata/packages.yaml new file mode 100644 index 0000000..557e20b --- /dev/null +++ b/home/.chezmoidata/packages.yaml @@ -0,0 +1,96 @@ +packages: + arch: + base: + - etc-update + - pikaur + + # archive + - 7-zip-full + - atool + - unrar + - unzip + - zip + + # tools + - bind # for `dig`, `nslookup` + - curl + - dos2unix + - fzf + - github-cli + - glances + - keychain + - less + - lm_sensors + - lsd + - neofetch + - neovim + - pass + - sudo + - thefuck + - tree + - vim + - zsh + + # devops + - ansible + - aws-cli-v2 + - docker + - helm + - k9s + - kubecolor + - kubectl + - kustomize + - terraform + + # language / runtimes + - go + - python-pip + - python-virtualenv + + + # scripting utils + - dialog + - jq + - pv + - python-pyfiglet + + base_desktop: + - alacritty + - dex + - feh + - gammastep + - grim + - libappindicator-gtk3 + - mako + - qt5-wayland + - qt6-wayland + - sway + - swayidle + - swaylock + - wob + - xdg-desktop-portal-wlr + - ydotool + + # pipewire + - pipewire-jack + - pipewire-pulse + - wireplumber + + # fonts + - nerd-fonts-git + - otf-font-awesome-5 + - ttf-droid + - ttf-google-fonts-git + - ttf-hack + - ttf-liberation + - ttf-material-design-icons-git + - ttf-ms-win10-auto + + # theming + - matcha-gtk-theme + - mint-y-icons + + # xorg + - xorg-xauth + - xorg-xhost + - xorg-xwayland \ No newline at end of file diff --git a/home/.chezmoidata/units.yaml b/home/.chezmoidata/units.yaml new file mode 100644 index 0000000..3450299 --- /dev/null +++ b/home/.chezmoidata/units.yaml @@ -0,0 +1,9 @@ +units: + system: + - docker.socket + - sshd.service + user: + - swayidle.service + - wob.service + - mako.service + - gammastep \ No newline at end of file diff --git a/home/run_onchange_packages.sh.tmpl b/home/run_onchange_packages.sh.tmpl new file mode 100644 index 0000000..2002768 --- /dev/null +++ b/home/run_onchange_packages.sh.tmpl @@ -0,0 +1,19 @@ +#!/bin/bash + +{{- if eq .chezmoi.osRelease.id "arch" }} +sudo pacman -Sy + +if ! which pikaur >/dev/null; then + git clone --depth 1 https://aur.archlinux.org/pikaur.git /tmp/pikaur + cd /tmp/pikaur + makepkg -si --noconfirm + rm -rf /tmp/pikaur +fi + +pikaur -S --needed --noconfirm {{ .packages.arch.base | join " " }} + +{{- if not (contains .chezmoi.kernel.osrelease "WSL") }} +pikaur -S --needed --noconfirm {{ .packages.arch.base_desktop | join " " }} +{{- end }} + +{{- end }} \ No newline at end of file diff --git a/home/run_onchange_units.sh b/home/run_onchange_units.sh deleted file mode 100644 index 6e5c8e7..0000000 --- a/home/run_onchange_units.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -systemctl --user daemon-reload -systemctl --user enable --now swayidle.service -systemctl --user enable --now wob.service -systemctl --user enable --now mako.service \ No newline at end of file diff --git a/home/run_onchange_units.sh.tmpl b/home/run_onchange_units.sh.tmpl new file mode 100644 index 0000000..2a62982 --- /dev/null +++ b/home/run_onchange_units.sh.tmpl @@ -0,0 +1,10 @@ +#!/bin/bash +sudo systemctl daemon-reload +{{ range .units.system -}} +sudo systemctl enable --now {{ . }} || true +{{ end -}} + +systemctl --user daemon-reload +{{ range .units.user -}} +systemctl --user enable --now {{ . }} || true +{{ end -}} \ No newline at end of file