From 9480794c2bd0f3278e6fc2b8070c3e4d51072806 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Thu, 21 Sep 2023 22:53:20 -0700 Subject: [PATCH] feat: Add Web App Manager, OpenRazer, Oversteer, Solaar, and Resilio Sync --- .github/workflows/build.yml | 2 + .../resilio_sync/fedora-resilio-sync.service | 10 +++ .../usr/share/ublue-os/just/30-distrobox.just | 72 ++++++++++++++++--- 3 files changed, 75 insertions(+), 9 deletions(-) create mode 100644 post_install_files/resilio_sync/fedora-resilio-sync.service diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a7e8db708fd..29b26b2b0ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,7 @@ on: - '**.txt' - 'repo_content/**' - 'spec_files/**' + - 'post_install_files/**' push: branches: - main @@ -18,6 +19,7 @@ on: - '**.txt' - 'repo_content/**' - 'spec_files/**' + - 'post_install_files/**' merge_group: workflow_dispatch: env: diff --git a/post_install_files/resilio_sync/fedora-resilio-sync.service b/post_install_files/resilio_sync/fedora-resilio-sync.service new file mode 100644 index 00000000000..c09dd80af3a --- /dev/null +++ b/post_install_files/resilio_sync/fedora-resilio-sync.service @@ -0,0 +1,10 @@ +[Unit] +Description=Resilio Sync per-user service +After=network.target + +[Service] +Type=simple +ExecStart=/usr/bin/distrobox-enter -n fedora -- ' /usr/bin/rslsync --nodaemon' + +[Install] +WantedBy=default.target diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/30-distrobox.just b/system_files/desktop/shared/usr/share/ublue-os/just/30-distrobox.just index 2e6900a1edd..ea764b17fbb 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/30-distrobox.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/30-distrobox.just @@ -30,6 +30,17 @@ distrobox-ubuntu: echo 'Creating Ubuntu distrobox ...' distrobox create --nvidia --image quay.io/toolbx-images/ubuntu-toolbox:22.04 -n ubuntu -Y +# Install obs-studio-portable from wimpysworld, which bundles an extensive collection of 3rd party plugins +install-obs-studio-portable: + if grep -qz "obs-studio-portable" <<< $(distrobox list); then \ + echo 'Removing existing obs-studio-portable install...' && \ + distrobox rm obs-studio-portable --force; \ + fi && \ + echo 'Installing obs-studio-portable...' && \ + distrobox create --no-entry --name obs-studio-portable --image ghcr.io/ublue-os/obs-studio-portable --nvidia --yes && \ + distrobox-enter -n obs-studio-portable -- 'bash -c "distrobox-export --app obs"' && \ + echo 'Install complete' + # Set up Bazzite-Arch Distrobox container install-bazzite-arch: source /etc/default/bazzite && \ @@ -58,13 +69,56 @@ install-bazzite-arch: sleep 10 && \ rm -f ~/Desktop/steam.desktop -# Install obs-studio-portable from wimpysworld, which bundles an extensive collection of 3rd party plugins -install-obs-studio-portable: - if grep -qz "obs-studio-portable" <<< $(distrobox list); then \ - echo 'Removing existing obs-studio-portable install...' && \ - distrobox rm obs-studio-portable --force; \ +# Install Webapp manager +install-webapp-manager: + if grep -qz "fedora" <<< $(distrobox list); then \ + /usr/bin/just distrobox-fedora \ fi && \ - echo 'Installing obs-studio-portable...' && \ - distrobox create --no-entry --name obs-studio-portable --image ghcr.io/ublue-os/obs-studio-portable --nvidia --yes && \ - distrobox-enter -n obs-studio-portable -- 'bash -c "distrobox-export --app obs"' && \ - echo 'Install complete' \ No newline at end of file + distrobox-enter -n fedora -- sudo sh -c "sudo dnf copr enable -y kylegospo/webapp-manager && \ + sudo dnf install -y webapp-manager && \ + distrobox-export --app webapp-manager" + +# Install Oversteer for Logitech steering wheels +install-oversteer: + if grep -qz "fedora" <<< $(distrobox list); then \ + /usr/bin/just distrobox-fedora \ + fi && \ + distrobox enter -n fedora -- bash -c 'sudo dnf copr enable -y kylegospo/oversteer && \ + sudo dnf install \ + python3-evdev \ + oversteer && \ + distrobox-export --app oversteer' + +# Install OpenRazer for Razer gaming hardware +install-openrazer: + if grep -qz "fedora" <<< $(distrobox list); then \ + /usr/bin/just distrobox-fedora \ + fi && \ + distrobox-enter -n fedora -- bash -c 'sudo wget https://download.opensuse.org/repositories/hardware:/razer/Fedora_$(rpm -E %fedora)/hardware:razer.repo -O /etc/yum.repos.d/hardware:razer.repo && \ + sudo dnf install -y \ + openrazer-meta' + +# Install Solaar for Logitech Mice, Keyboards, and Trackpads +install-solaar: + if grep -qz "fedora" <<< $(distrobox list); then \ + /usr/bin/just distrobox-fedora \ + fi && \ + distrobox-enter -n fedora -- bash -c 'sudo dnf install -y \ + solaar && \ + distrobox-export --app solaar' && \ + mkdir -p ~/.config/autostart && \ + rm -f ~/.config/autostart/fedora-solaar.desktop && \ + cp ~/.local/share/applications/fedora-solaar.desktop ~/.config/autostart/fedora-solaar.desktop + +# Install Resilio Sync +install-resilio-sync: + if grep -qz "fedora" <<< $(distrobox list); then \ + /usr/bin/just distrobox-fedora \ + fi && \ + distrobox-enter -n fedora -- bash -c 'sudo rpm --import https://linux-packages.resilio.com/resilio-sync/key.asc && \ + printf "[resilio-sync]\nname=Resilio Sync\nbaseurl=https://linux-packages.resilio.com/resilio-sync/rpm/\$basearch\nenabled=1\ngpgcheck=1\n" | sudo tee /etc/yum.repos.d/resilio-sync.repo && \ + sudo dnf install -y resilio-sync' && \ + mkdir -p ~/.config/systemd/user/ && \ + rm -f ~/.config/systemd/user/fedora-resilio-sync.service && \ + wget https://raw.githubusercontent.com/ublue-os/bazzite/main/post_install_files/resilio_sync/fedora-resilio-sync.service -O ~/.config/systemd/user/fedora-resilio-sync.service && \ + systemctl enable --user --now fedora-resilio-sync