#!/bin/bash # run_once_40-install-apps.sh # Desktop applications. Skipped on server. set -euo pipefail warn() { echo ">>> [apps] WARNING: $*" >&2; } SYS="{{ .system | default "desktop" }}" GAMING="{{ .gaming | default false }}" REMOTE_ACCESS="{{ .remote_access | default false }}" DISTRO_ID="{{ .chezmoi.osRelease.id | default "" }}" 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 lshw \ mpv nvtop pavucontrol thunderbird firefox yt-dlp \ feishin # AUR packages AUR_PKGS=(appimagelauncher vesktop-git) if [ "$REMOTE_ACCESS" = "true" ]; then AUR_PKGS+=(rustdesk) echo ">>> [apps] installing AUR packages (incl. remote access tools): ${AUR_PKGS[*]}" else echo ">>> [apps] installing AUR packages (remote access skipped per user choice): ${AUR_PKGS[*]}" fi yay -Sy --noconfirm --needed "${AUR_PKGS[@]}" \ || warn "yay AUR install failed (see output above)" # 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"