Initial scaffold: idempotent Sunshine + Moonlight installer for Omarchy
Sets up bidirectional game streaming across Omarchy/Hyprland/Wayland machines (NVIDIA desktop and AMD Framework laptop), with the Macbook as an additional Moonlight client. The same install.sh runs on either machine; GPU vendor is detected at runtime and the appropriate hardware-encode packages are installed. Includes: - KMS capture setup (cap_sys_admin on sunshine, input group, uinput udev rule) - ufw / firewalld port opening when a firewall is active - systemd --user service + loginctl enable-linger for always-on hosting - uninstall.sh with --purge for user data removal - Flags to install host-only or client-only
This commit is contained in:
35
lib/packages.sh
Normal file
35
lib/packages.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install Sunshine, Moonlight, and GPU-specific hardware-encode dependencies.
|
||||
|
||||
# Default to source build (canonical AUR package). Override with SUNSHINE_PKG=sunshine-bin
|
||||
# in the environment for the precompiled build (much faster install).
|
||||
: "${SUNSHINE_PKG:=sunshine}"
|
||||
|
||||
install_sunshine() {
|
||||
yay_install "$SUNSHINE_PKG"
|
||||
}
|
||||
|
||||
install_moonlight() {
|
||||
# moonlight-qt is in the AUR (also a -bin variant). yay handles both.
|
||||
yay_install moonlight-qt
|
||||
}
|
||||
|
||||
install_gpu_encoder_packages() {
|
||||
case "$GPU_VENDOR" in
|
||||
nvidia)
|
||||
# NVENC works through the proprietary driver. libva-nvidia-driver lets some
|
||||
# apps use VAAPI on NVIDIA; not strictly required for Sunshine NVENC but useful.
|
||||
yay_install nvidia-utils libva-nvidia-driver
|
||||
;;
|
||||
amd)
|
||||
# VAAPI (mesa) + Vulkan for AMD hardware encode paths.
|
||||
yay_install libva-mesa-driver mesa-vdpau vulkan-radeon
|
||||
;;
|
||||
intel)
|
||||
yay_install intel-media-driver vulkan-intel
|
||||
;;
|
||||
*)
|
||||
info "Unknown GPU vendor; skipping vendor-specific encoder packages."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
Reference in New Issue
Block a user