Updated scripts
This commit is contained in:
@@ -10,7 +10,7 @@ HOSTNAME=$(hostname | tr '[:lower:]' '[:upper:]')
|
||||
|
||||
# Declare associative array for roles
|
||||
declare -A ROLES
|
||||
for role in LAB BT GAME VR DESKTOP_BASE DESKTOP_WORK CODE NVIDIA_GPU NVIDIA_1080_GPU TERMINAL HYPERLAND; do
|
||||
for role in MUSIC LAB BT GAME VR DESKTOP_BASE DESKTOP_WORK CODE NVIDIA_GPU NVIDIA_1080_GPU TERMINAL HYPERLAND; do
|
||||
ROLES["$role"]="no"
|
||||
done
|
||||
|
||||
@@ -22,6 +22,7 @@ CMBOX)
|
||||
ROLES[CODE]="yes"
|
||||
ROLES[TERMINAL]="yes"
|
||||
ROLES[HYPERLAND]="yes"
|
||||
ROLES[MUSIC]="yes"
|
||||
;;
|
||||
STEAMBOX)
|
||||
ROLES[GAME]="yes"
|
||||
@@ -76,18 +77,12 @@ sleep 1
|
||||
|
||||
# Create backup/snapshot
|
||||
if pacman -Qs timeshift >/dev/null; then
|
||||
# CONFIG_FILE="/etc/timeshift/timeshift.json"
|
||||
# if [ -f "$CONFIG_FILE" ]; then
|
||||
# BTRFS_MODE=$(jq '.btrfs_mode' "$CONFIG_FILE")
|
||||
# if [ "$BTRFS_MODE" == '"true"' ]; then
|
||||
printf -- '\033[33m Creating backup/snapshot\n\033[37m'
|
||||
sudo timeshift --create --comments "Update script"
|
||||
# fi
|
||||
# fi
|
||||
fi
|
||||
|
||||
# Enable multilib (if applicable)
|
||||
if [ "${ROLES[GAME]}" == "yes" ]; then
|
||||
if [ "${ROLES[GAME]}" == "yes" ] || [ "${ROLES[MUSIC]}" == "yes" ]; then
|
||||
if ! grep -q "^\[multilib\]" /etc/pacman.conf; then
|
||||
printf -- '\033[33m Enabling multilib\n\033[37m'
|
||||
sudo tee -a /etc/pacman.conf >/dev/null <<EOT
|
||||
@@ -238,7 +233,8 @@ if [ "${ROLES[TERMINAL]}" == "yes" ]; then
|
||||
if pacman -Qs gnu-free-fonts >/dev/null; then
|
||||
sudo pacman --noconfirm -R gnu-free-fonts
|
||||
fi
|
||||
sudo pacman --noconfirm --needed -S dysk lazygit alacritty btop ranger tmux fd neovim ttf-nerd-fonts-symbols ttf-roboto-mono-nerd gdu ruby bottom go php luarocks composer jdk-openjdk julia nodejs npm
|
||||
sudo pacman --noconfirm --needed -S dysk lazygit alacritty btop ranger tmux fd ttf-nerd-fonts-symbols ttf-roboto-mono-nerd gdu ruby bottom go php luarocks composer jdk-openjdk julia nodejs npm
|
||||
yay --noconfirm -S --needed --aur neovim-git-bin
|
||||
|
||||
sudo npm install -g neovim
|
||||
|
||||
@@ -332,12 +328,6 @@ EOT
|
||||
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
if [ "$HOSTNAME" == "CMBOX" ]; then
|
||||
printf -- '\033[33m Installing CMBOX specific utilities\n\033[37m'
|
||||
sudo pacman -S --noconfirm --needed onnxruntime qt6-serialport cameractrls qt6-5compat
|
||||
yay --noconfirm -S --needed --aur openmpi
|
||||
# yay --noconfirm -S --needed --aur opentrack-git
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${ROLES[DESKTOP_WORK]}" == "yes" ]; then
|
||||
@@ -349,6 +339,38 @@ if [ "${ROLES[DESKTOP_WORK]}" == "yes" ]; then
|
||||
flatpak install -y flathub org.gimp.GIMP
|
||||
fi
|
||||
|
||||
# Install music production utility
|
||||
if [ "${ROLES[MUSIC]}" == "yes" ]; then
|
||||
sudo pacman -U --noconfirm https://archive.archlinux.org/packages/w/wine-staging/wine-staging-9.21-1-x86_64.pkg.tar.zst
|
||||
PKG="wine-staging"
|
||||
# Check if package is already in IgnorePkg
|
||||
if ! grep -q "^IgnorePkg.*\b$PKG\b" /etc/pacman.conf; then
|
||||
sudo sed -i "/^#IgnorePkg/ s/^#//" /etc/pacman.conf # uncomment if commented
|
||||
sudo sed -i "/^IgnorePkg/ s/$/ $PKG/" /etc/pacman.conf # append package name
|
||||
echo "Added $PKG to IgnorePkg in /etc/pacman.conf"
|
||||
else
|
||||
echo "$PKG is already in IgnorePkg."
|
||||
fi
|
||||
yay -Rdd pulseaudio pulseaudio-alsa pulseaudio-jack jack2
|
||||
sudo pacman -S --noconfirm --needed pipewire pipewire-jack pipewire-alsa pipewire-pulse gamemode
|
||||
sudo pacman -S --noconfirm --needed pipewire-tools qpwgraph realtime-privileges yabridge yabridgectl
|
||||
yay --noconfirm -S --needed --aur bitwig-studio
|
||||
|
||||
sudo usermod -a -G realtime,audio,gamemode $USER
|
||||
|
||||
sudo tee /etc/security/limits.d/99-pipewire.conf <<'EOF'
|
||||
@audio soft rtprio 95
|
||||
@audio soft memlock unlimited
|
||||
@audio hard rtprio 95
|
||||
@audio hard memlock unlimited
|
||||
EOF
|
||||
|
||||
systemctl --user --now disable pulseaudio.{socket,service}
|
||||
systemctl --user mask pulseaudio
|
||||
systemctl --user --now enable pipewire{,-pulse}.{socket,service} filter-chain.service
|
||||
pw-metadata -n settings 0 clock.min-quantum 128
|
||||
fi
|
||||
|
||||
# Install game utility
|
||||
if [ "${ROLES[GAME]}" == "yes" ]; then
|
||||
printf -- '\033[33m Installing game utilities\n\033[37m'
|
||||
|
||||
Reference in New Issue
Block a user