chore: including functionality as a submodule of the bling module

This commit is contained in:
Lucas Ribeiro 2023-10-13 14:08:48 -03:00
parent 978406d372
commit 3036635a12
No known key found for this signature in database
GPG key ID: 5EF9C1683DC0E253
5 changed files with 39 additions and 37 deletions

View file

@ -19,4 +19,5 @@ install:
# - gnome-vrr # enables gnome-vrr for your image
# - container-tools # installs container-related tools onto /usr/bin: kind, kubectx, docker-compose and kubens
# - laptop # installs TLP and configures your system for laptop usage
# - flatpaksync # allows synchronization of user-installed flatpaks. For more information, see the <bling-repo>/modules/bling/flatpaksync.md
```

View file

@ -0,0 +1,25 @@
# `flatpaksync` submodule
The `flatpaksync` submodule can be used to synchronize user-installed flatpaks into a gist or traditional repository.
To activate it, simply follow the example below:
## Example configuration
```yaml
- type: bling
# ...other submodules...
- flatpaksync
```
Once the submodule 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, has already done the step above and has a `flatpak.list` file in the repository, simply use the `flatpakcheckout` binary to perform the installation and start the synchronization.
**It is important to note that this submodule will NOT enable Flathub. If your applications come from there, you will need to enable Flathub before running it.**
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
SYSTEMD_USER_JOBS_DIR="/usr/lib/systemd/user/"
mkdir -p "$SYSTEMD_USER_JOBS_DIR"
chmod +x "$BLING_DIRECTORY"/files/usr/bin/flatpaksync/*
cp -r "$BLING_DIRECTORY"/files/usr/bin/flatpaksync/* /usr/bin/
cp -r "$BLING_DIRECTORY"/files/usr/lib/systemd/user/flatpaksync/* "$SYSTEMD_USER_JOBS_DIR"
systemctl enable --global flatpaksync.path

View file

@ -1,22 +0,0 @@
# `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

@ -1,15 +0,0 @@
#!/usr/bin/env bash
set -oue pipefail
BLING_FILES_DIRECTORY="/tmp/bling/files"
SYSTEMD_USER_JOBS_DIR="/usr/lib/systemd/user/"
mkdir -p "$SYSTEMD_USER_JOBS_DIR"
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/* "$SYSTEMD_USER_JOBS_DIR"
systemctl enable --global flatpaksync.path