Files
Nix-Vibe/modules/desktop/apps/openlp.nix
T
petere eb08cd4282 Nix-Vibe public snapshot (squashed history)
Current state of main at 0240060 feat(hp-laptop): install TeleportFling from its flake. History intentionally
collapsed to a single commit; this repo mirrors only the latest state.
2026-09-19 13:53:39 +01:00

43 lines
1.3 KiB
Nix

{ pkgs, ... }:
{
# Install OpenLP from official flatpak bundle
# Update the version in the URL when new releases are available
systemd.services.openlp-flatpak-install = {
description = "Install OpenLP from official flatpak bundle";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = pkgs.writeShellScript "install-openlp" ''
set -e
OPENLP_VERSION="3.1.7"
OPENLP_URL="https://get.openlp.org/$OPENLP_VERSION/openlp-$OPENLP_VERSION-1.flatpak"
OPENLP_ID="org.openlp.OpenLP"
# Check if already installed
if ${pkgs.flatpak}/bin/flatpak list --app | grep -q "$OPENLP_ID"; then
echo "OpenLP is already installed"
exit 0
fi
# Download and install the bundle
echo "Downloading OpenLP $OPENLP_VERSION..."
TEMP_FILE=$(${pkgs.coreutils}/bin/mktemp)
${pkgs.curl}/bin/curl -L -o "$TEMP_FILE" "$OPENLP_URL"
echo "Installing OpenLP from bundle..."
${pkgs.flatpak}/bin/flatpak install --system --bundle --noninteractive -y "$TEMP_FILE"
# Cleanup
${pkgs.coreutils}/bin/rm -f "$TEMP_FILE"
echo "OpenLP installed successfully"
'';
};
};
}