feat: flatpaksync module
This commit is contained in:
parent
dbb67ea43d
commit
1cbaa10135
6 changed files with 97 additions and 0 deletions
22
modules/flatpak-sync/README.md
Normal file
22
modules/flatpak-sync/README.md
Normal 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.
|
||||
13
modules/flatpak-sync/flatpak-sync.sh
Normal file
13
modules/flatpak-sync/flatpak-sync.sh
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue