diff --git a/.chezmoidata/packages.yaml b/.chezmoidata/packages.yaml index 193b9ee..341c9af 100644 --- a/.chezmoidata/packages.yaml +++ b/.chezmoidata/packages.yaml @@ -21,4 +21,28 @@ fedora: - "com.slack.Slack" - "com.spotify.Client" - "rest.insomnia.Insomnia" - - "com.google.AndroidStudio" \ No newline at end of file + - "com.google.AndroidStudio" +cachyos: + packages: + - "git" + - "zsh" + - "zoxide" + - "fzf" + - "ripgrep" + - "fastfetch" + - "starship" + - "chromium" + - "qemu-desktop" + - "libvirt" + - "edk2-ovmf" + - "dnsmasq" + - "iptables-nft" + aur: + - "ghostty" + - "google-chrome" + - "mise" + - "visual-studio-code-bin" + - "slack-desktop" + - "spotify" + - "insomnia" + - "android-studio" diff --git a/.chezmoiscripts/run_onchange_install-packages-cachyos.sh.tmpl b/.chezmoiscripts/run_onchange_install-packages-cachyos.sh.tmpl new file mode 100644 index 0000000..e093bf8 --- /dev/null +++ b/.chezmoiscripts/run_onchange_install-packages-cachyos.sh.tmpl @@ -0,0 +1,42 @@ +#!/bin/bash + +set -euo pipefail + +# Functie om te controleren of een commando bestaat +command_exists() { + command -v "$1" >/dev/null 2>&1 +} + +# Installeer yay indien niet aanwezig +if ! command_exists yay; then + echo "yay niet gevonden. Bezig met installeren van yay..." + sudo pacman -S --needed --noconfirm git base-devel + git clone https://aur.archlinux.org/yay.git /tmp/yay + (cd /tmp/yay && makepkg -si --noconfirm) + rm -rf /tmp/yay +fi + +# Installeer pakketten uit de officiƫle repositories +{{- if .packages.cachyos.packages }} +echo "Bezig met installeren van pakketten uit de officiƫle repositories..." +yay -S --needed --noconfirm {{ .packages.cachyos.packages | join " " }} +{{- end }} + +# Installeer AUR-pakketten +{{- if .packages.cachyos.aur }} +echo "Bezig met installeren van AUR-pakketten..." +yay -S --needed --noconfirm {{ .packages.cachyos.aur | join " " }} +{{- end }} + +# Post-installatie configuratie voor virtualisatie +{{- if has "libvirt" .packages.cachyos.packages }} +echo "Bezig met configureren van virtualisatie..." +echo "Voeg gebruiker toe aan de libvirt groep..." +sudo usermod -a -G libvirt $(whoami) + +echo "Inschakelen en starten van de libvirtd service..." +sudo systemctl enable libvirtd.service +sudo systemctl start libvirtd.service +{{- end }} + +echo "CachyOS pakketinstallatie voltooid." diff --git a/run_onchange_install-packages.sh.tmpl b/run_onchange_install-packages.sh.tmpl index 19d8a7e..8ef4ea9 100644 --- a/run_onchange_install-packages.sh.tmpl +++ b/run_onchange_install-packages.sh.tmpl @@ -9,5 +9,7 @@ set -euo pipefail # Debian-specific code {{ else if eq .chezmoi.osRelease.id "fedora" }} {{ includeTemplate ".chezmoiscripts/run_onchange_install-packages-fedora.sh.tmpl" . }} +{{ else if eq .chezmoi.osRelease.id "cachyos" }} +{{ includeTemplate ".chezmoiscripts/run_onchange_install-packages-cachyos.sh.tmpl" . }} {{ end }} {{ end }}