#!/usr/bin/env bash

# omarchy:summary=Install Flatpak with the Flathub remote for the system and the user
# omarchy:requires-sudo=true
# omarchy:hidden=true

# Based: the images ship Flatpak and Flathub already, so this row has no
# menu entry; it is here for the rows that build on it.

set -eo pipefail

source omarchy-require-linux

echo "Installing Flatpak..."
omarchy-pkg-add flatpak
sudo flatpak remote-add --if-not-exists --system flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo
