chore(sunshine): Install like any other flatpak

Flathub provides the latest stable release of Sunshine so let's get it from there
This commit is contained in:
RJ Trujillo 2023-11-21 06:35:09 -07:00
parent a60d4c3bd6
commit f09dbb99ea
2 changed files with 5 additions and 34 deletions

View File

@ -90,7 +90,7 @@ screens:
description: A streaming utility that's better than Steam Link! Paired with Moonlight
default: false
packages:
- Retrieve Sunshine: sudo -A ujust get-sunshine
- Install Sunshine: ujust install-sunshine
Wootility:
description: A configurator for Wooting keyboards
default: false

View File

@ -30,41 +30,12 @@ configure-waydroid:
deactivate
sudo rm -rf /tmp/waydroid_script
# Retrieve Sunshine
get-sunshine:
wget \
$(curl -s https://api.github.com/repos/LizardByte/Sunshine/releases/latest | \
jq -r ".assets[] | select(.name | test(\"sunshine_x86_64.flatpak\")) | .browser_download_url") \
-O /tmp/sunshine.flatpak
sudo flatpak install --system /tmp/sunshine.flatpak -y
sudo mkdir -p /var/usrlocal/systemd/system
echo -e \
"[Unit]\n\
Description=Sunshine is a self-hosted game stream host for Moonlight.\n\
StartLimitIntervalSec=500\n\
StartLimitBurst=5\n\
\n\
[Service]\n\
Environment=PULSE_SERVER=unix:/run/user/1000/pulse/native\n\
ExecStart=flatpak run dev.lizardbyte.sunshine\n\
ExecStop=flatpak kill dev.lizardbyte.sunshine\n\
Restart=on-failure\n\
RestartSec=5s\n\
\n\
[Install]\n\
WantedBy=graphical.target" | \
sudo tee /var/usrlocal/systemd/system/sunshine.service
sudo systemctl enable sunshine
# Install Sunshine
install-sunshine:
#!/usr/bin/env bash
flatpak install --system --noninteractive flathub dev.lizardbyte.app.Sunshine
echo "Sunshine is installed!"
# Remove Sunshine
remove-sunshine:
sudo systemctl disable sunshine.service
sudo systemctl stop sunshine.service
sudo flatpak remove --system dev.lizardbyte.sunshine -y
sudo rm /var/usrlocal/systemd/system/sunshine.service
echo "Sunshine successfully deinstalled."
# Install Decky Loader (https://github.com/SteamDeckHomebrew/decky-loader)
get-decky:
#!/usr/bin/env bash