feat: flatpaksync module

This commit is contained in:
Lucas Ribeiro 2023-10-12 08:48:35 -03:00
parent dbb67ea43d
commit 1cbaa10135
No known key found for this signature in database
GPG key ID: 5EF9C1683DC0E253
6 changed files with 97 additions and 0 deletions

View file

@ -0,0 +1,22 @@
# `flatpaksync` Module for Startingpoint
The `flatpaksync` module can be used to synchronize user-installed flatpaks into a gist.
To activate it, simply follow the example below:
## Example configuration
```yaml
- type: flatpaksync
enable: true
```
Once the module is activated, users can create a file `$HOME/.config/flatpaksync/env` informing the repository that will be used to synchronize their apps in the POSIX standard:
```bash
GIST_REPO=<YOUR_REPO>
```
If the user has not yet installed their flatpaks and has already done the step above, simply use the `flatpakcheckout` binary to perform the installation and start the synchronization.
If the user has already configured their repository in the `$HOME/.config/flatpaksync/env` file but already has their flatpaks installed, simply create the `$HOME/.config/flatpaks.user.installed` file to start the synchronization.

View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -oue pipefail
export BLING_FILES_DIRECTORY="/tmp/bling/files"
chmod +x "$BLING_FILES_DIRECTORY"/usr/bin/flatpaksync/*
cp -r "$BLING_FILES_DIRECTORY"/usr/bin/flatpaksync/* /usr/bin/
cp -r "$BLING_FILES_DIRECTORY"/usr/lib/systemd/user/flatpaksync.service /usr/lib/systemd/user/flatpaksync.service
cp -r "$BLING_FILES_DIRECTORY"/usr/lib/systemd/user/flatpaksync.path /usr/lib/systemd/user/flatpaksync.path
systemctl enable --global flatpaksync.path