58 lines
1.7 KiB
Bash
Executable File
58 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
# run_once_40-install-apps.sh
|
|
# Desktop applications. Skipped on server.
|
|
|
|
set -euo pipefail
|
|
|
|
SYS="$(chezmoi data --format=json 2>/dev/null | jq -r '.system // "desktop"')"
|
|
GAMING="$(chezmoi data --format=json 2>/dev/null | jq -r '.gaming // "false"')"
|
|
DISTRO_ID="$(chezmoi data --format=json 2>/dev/null | jq -r '.chezmoi.osRelease.id // empty')"
|
|
|
|
if [ "$SYS" = "server" ]; then
|
|
echo ">>> [apps] system=server, skipping"
|
|
exit 0
|
|
fi
|
|
|
|
case "$DISTRO_ID" in
|
|
arch)
|
|
echo ">>> [apps] arch, system=$SYS"
|
|
# System packages
|
|
echo ">>> [apps] installing packages"
|
|
sudo pacman -Syu --noconfirm --needed \
|
|
libreoffice-fresh nextcloud-client \
|
|
gvfs gvfs-mtp gvfs-smb thunar tumbler \
|
|
mpv nvtop pavucontrol thunderbird firefox yt-dlp \
|
|
feishin
|
|
|
|
# AUR packages
|
|
echo ">>> [apps] installing AUR packages"
|
|
yay -Sy --noconfirm --needed \
|
|
appimagelauncher rustdesk vesktop-git
|
|
|
|
# Gaming packages
|
|
if [ "$GAMING" = "true" ]; then
|
|
echo ">>> [apps] installing gaming packages"
|
|
sudo pacman -Syu --noconfirm --needed \
|
|
steam
|
|
|
|
yay -Sy --noconfirm --needed \
|
|
heroic-games-launcher-bin
|
|
fi
|
|
;;
|
|
|
|
ubuntu)
|
|
echo ">>> [apps] ubuntu, system=$SYS"
|
|
sudo apt-get install -y \
|
|
libreoffice nextcloud-desktop \
|
|
mpv nvtop pavucontrol thunderbird firefox yt-dlp
|
|
echo ">>> [apps] TODO: install via Flatpak/Snap — feishin, ..."
|
|
;;
|
|
|
|
*)
|
|
echo ">>> [apps] unsupported distro: ${DISTRO_ID:-unknown}, skipping"
|
|
exit 0
|
|
;;
|
|
esac
|
|
|
|
echo ">>> [apps] done"
|