Skip to content

Commit

Permalink
Merge pull request #86 from ublue-os/flatpaks
Browse files Browse the repository at this point in the history
feat: Improve management of Flatpaks
  • Loading branch information
KyleGospo authored Aug 1, 2023
2 parents 23dbe0d + d2d6603 commit 6f0b1a8
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 32 deletions.
16 changes: 15 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ RUN if grep -v "nvidia" <<< "${IMAGE_NAME}"; then \
rpm-ostree install \
rocm-hip \
rocm-opencl \
; fi
; fi

# Cleanup & Finalize
RUN rm /usr/share/applications/shredder.desktop && \
Expand All @@ -95,6 +95,15 @@ RUN rm /usr/share/applications/shredder.desktop && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_ycollet-audinux.repo && \
sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=15s/' /etc/systemd/user.conf && \
sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=15s/' /etc/systemd/system.conf && \
flatpak remove --system --noninteractive --all && \
mkdir -p /etc/flatpak/remotes.d && \
wget -q https://dl.flathub.org/repo/flathub.flatpakrepo -P /etc/flatpak/remotes.d && \
cat /etc/flatpak/install | while read line; do flatpak install --system --noninteractive --no-deploy flathub $line; done && \
mkdir -p /etc/flatpak/{flathub,objects} && \
cp -r /var/lib/flatpak/repo/refs/remotes/flathub/* /etc/flatpak/flathub && \
cp -r /var/lib/flatpak/repo/objects/* /etc/flatpak/objects && \
systemctl unmask flatpak-system-install.service && \
systemctl enable flatpak-system-install.service && \
systemctl disable rpm-ostreed-automatic.timer && \
systemctl --global enable ublue-update.timer && \
systemctl enable input-remapper.service && \
Expand Down Expand Up @@ -192,6 +201,11 @@ RUN rm /usr/share/applications/winetricks.desktop && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-wallpaper-engine-kde-plugin.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_ycollet-audinux.repo && \
mv /etc/sddm.conf /etc/sddm.conf.d/steamos.conf && \
flatpak remove --system --noninteractive --all && \
cat /etc/flatpak/install | while read line; do flatpak install --system --noninteractive --no-deploy flathub $line; done && \
rm -rf /etc/flatpak/{flathub,objects}/* && \
cp -r /var/lib/flatpak/repo/refs/remotes/flathub/* /etc/flatpak/flathub && \
cp -r /var/lib/flatpak/repo/objects/* /etc/flatpak/objects && \
systemctl enable plasma-autologin.service && \
systemctl enable jupiter-fan-control.service && \
systemctl enable vpower.service && \
Expand Down
4 changes: 4 additions & 0 deletions system_files/deck/etc/flatpak/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
com.github.Matoking.protontricks
net.davidotek.pupgui2
org.freedesktop.Platform.VulkanLayer.MangoHud//22.08
org.freedesktop.Platform.VulkanLayer.vkBasalt//22.08
22 changes: 6 additions & 16 deletions system_files/deck/usr/share/ublue-os/firstboot/yafti.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ screens:
default: false
packages:
- Retrieve Decky: sudo -A just --unstable get-decky
Chiaki4Deck:
description: PlayStation Remote Play
default: false
packages:
- Install Chiaki4Deck: just --unstable get-chiaki
EmuDeck:
description: |
A utility for installing and configuring emulators on the Steam Deck
Expand Down Expand Up @@ -126,24 +121,17 @@ screens:
- run: /usr/lib/fedora-third-party/fedora-third-party-opt-out
- run: /usr/bin/fedora-third-party disable
- run: flatpak remote-delete fedora --force
- run: flatpak remove --system --noninteractive --all
- run: flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo
applications:
source: yafti.screen.package
values:
title: Application Installation
show_terminal: true
package_manager: yafti.plugin.flatpak
package_manager_defaults:
user: true
system: false
groups:
Bazzite:
description: Core Applications
default: true
packages:
- MangoHud (Flatpak): org.freedesktop.Platform.VulkanLayer.MangoHud//22.08
- Mozilla Firefox: org.mozilla.firefox
- Protontricks: com.github.Matoking.protontricks
- ProtonUp-Qt (Proton Updater): net.davidotek.pupgui2
- vkBasalt (Flatpak): org.freedesktop.Platform.VulkanLayer.vkBasalt//22.08
Web Browsers:
description: Additional browsers to complement Firefox
default: false
Expand All @@ -152,14 +140,16 @@ screens:
- Google Chrome: com.google.Chrome
- LibreWolf: io.gitlab.librewolf-community
- Microsoft Edge: com.microsoft.Edge
- Mozilla Firefox: org.mozilla.firefox
- Opera: com.opera.Opera
Gaming:
description: "Rock and Stone!"
default: false
packages:
- Bottles: com.usebottles.bottles
- Chiaki4Deck (PlayStation Remote Play): io.github.streetpea.Chiaki4deck
- Discord: com.discordapp.Discord
- DOSBox Staging: io.github.dosbox-staging
- DOSBox Staging: io.github.dosbox-staging
- GeForce NOW Electron: io.github.hmlendea.geforcenow-electron
- Heroic Games Launcher (GOG &amp; Epic): com.heroicgameslauncher.hgl
- itch: io.itch.itch
Expand Down
7 changes: 1 addition & 6 deletions system_files/deck/usr/share/ublue-os/just/custom.just
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ get-emudeck:
get-steamcmd:
echo 'Installing SteamCMD...'
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz -O /tmp/steamcmd.tar.gz
tar -xvzf steamcmd.tar.gz -C ~/.steam
tar -xvzf /tmp/steamcmd.tar.gz -C ~/.steam
rm /tmp/steamcmd.tar.gz

enable-system76-scheduler:
Expand Down Expand Up @@ -59,11 +59,6 @@ get-boilr:
-O ~/Desktop/BoilR
chmod +x ~/Desktop/BoilR

get-chiaki:
flatpak install \
$(curl -s https://api.github.com/repos/streetpea/chiaki4deck/releases/latest | \
jq -r ".assets[] | select(.name | test(\"flatpakref\")) | .browser_download_url")

enable-wallpaper-engine:
echo 'Installing Wallpaper Engine Plugin for KDE...'
git clone https://github.com/catsout/wallpaper-engine-kde-plugin.git --depth 1 /tmp/wallpaper-engine-kde-plugin
Expand Down
3 changes: 3 additions & 0 deletions system_files/desktop/etc/flatpak/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
net.davidotek.pupgui2
org.freedesktop.Platform.VulkanLayer.MangoHud//22.08
org.freedesktop.Platform.VulkanLayer.vkBasalt//22.08
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Install System Flatpak on boot
Documentation=https://github.com/ublue-os/endlish-oesque/issues/10

[Service]
Type=oneshot
ExecStart=/usr/bin/ublue-flatpak-system-install

[Install]
WantedBy=multi-user.target
10 changes: 10 additions & 0 deletions system_files/desktop/usr/bin/ublue-flatpak-system-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

if [[ -f '/etc/flatpak/install' ]]; then
cp -r /etc/flatpak/flathub/* /var/lib/flatpak/repo/refs/remotes/flathub
cp -r /etc/flatpak/objects/* /var/lib/flatpak/repo/objects
cat /etc/flatpak/install | while read line; do
flatpak install --system --noninteractive --no-pull flathub $line
done && mv /etc/flatpak/install /etc/flatpak/installed
fi
rm -rf /etc/flatpak/{flathub,objects}
13 changes: 4 additions & 9 deletions system_files/desktop/usr/share/ublue-os/firstboot/yafti.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,17 @@ screens:
- run: /usr/lib/fedora-third-party/fedora-third-party-opt-out
- run: /usr/bin/fedora-third-party disable
- run: flatpak remote-delete fedora --force
- run: flatpak remove --system --noninteractive --all
- run: flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo
applications:
source: yafti.screen.package
values:
title: Application Installation
show_terminal: true
package_manager: yafti.plugin.flatpak
package_manager_defaults:
user: true
system: false
groups:
Bazzite:
description: Core Applications
default: true
packages:
- MangoHud (Flatpak): org.freedesktop.Platform.VulkanLayer.MangoHud//22.08
- Mozilla Firefox: org.mozilla.firefox
- ProtonUp-Qt (Proton Updater): net.davidotek.pupgui2
- vkBasalt (Flatpak): org.freedesktop.Platform.VulkanLayer.vkBasalt//22.08
Web Browsers:
description: Additional browsers to complement Firefox
default: false
Expand All @@ -118,6 +112,7 @@ screens:
- Google Chrome: com.google.Chrome
- LibreWolf: io.gitlab.librewolf-community
- Microsoft Edge: com.microsoft.Edge
- Mozilla Firefox: org.mozilla.firefox
- Opera: com.opera.Opera
Gaming:
description: "Rock and Stone!"
Expand Down

0 comments on commit 6f0b1a8

Please sign in to comment.