Updated the README with the announcement that flatpaks can now be managed. Added the required documentation to the example.

This commit is contained in:
Dávid Groniewsky
2025-09-30 22:40:19 +02:00
parent 9ce42ccf3e
commit dbeed0b7d8
3 changed files with 16 additions and 0 deletions
+3
View File
@@ -1,5 +1,8 @@
# Decman # Decman
> 🎉 Support for Flatpaks was just added! 🎉
> By default flatpak management this feature is disabled. Take a look at the example to learn how to use flatpaks.
> 🎉 Decman now has a AUR package! 🎉 > 🎉 Decman now has a AUR package! 🎉
> >
> To start using the AUR package simply add `decman` to `decman.aur_packages`. To ensure a smooth change, add decman-git to ignored_packages during the conversion. > To start using the AUR package simply add `decman` to `decman.aur_packages`. To ensure a smooth change, add decman-git to ignored_packages during the conversion.
+4
View File
@@ -1,5 +1,6 @@
# from import is ok for importing classes and functions # from import is ok for importing classes and functions
# just remember to not import variables this way # just remember to not import variables this way
from typing import override
from decman import Module, File, Directory, UserPackage, sh, prg from decman import Module, File, Directory, UserPackage, sh, prg
@@ -112,6 +113,9 @@ class MyModule(Module):
def aur_packages(self) -> list[str]: def aur_packages(self) -> list[str]:
return ["protonvpn"] return ["protonvpn"]
def flatpak_packages(self) -> list[str]:
return ["org.mozilla.firefox"]
def systemd_units(self) -> list[str]: def systemd_units(self) -> list[str]:
return ["reflector.timer"] return ["reflector.timer"]
+9
View File
@@ -12,6 +12,9 @@ import decman.config
# This is fine since the thing being imported is a class and not a global variable. # This is fine since the thing being imported is a class and not a global variable.
from decman import UserPackage, File, Directory, UserRaisedError from decman import UserPackage, File, Directory, UserRaisedError
# Flatpaks are disabled by default. This way no already installed flatpaks will get suddenly deleted.
decman.config.enable_flatpak = True
# Configuring what packages are installed is easy. # Configuring what packages are installed is easy.
# Duplicates are OK, so if you have multiple modules that want to ensure a package is installed, # Duplicates are OK, so if you have multiple modules that want to ensure a package is installed,
# you can add the same package multiple times. # you can add the same package multiple times.
@@ -28,6 +31,12 @@ decman.ignored_packages += ["rustup", "yay"]
# Installing AUR packages is easy. # Installing AUR packages is easy.
decman.aur_packages += ["decman", "protonvpn"] decman.aur_packages += ["decman", "protonvpn"]
# Flatpaks work the same way as all other packages.
decman.flatpak_packages += ["dev.qwery.AddWater"]
# They too can be ignored of course
decman.ignored_flatpak_packages += ["org.signal.Signal"]
# To import GPG keys, set the GNUPGHOME environment variable. # To import GPG keys, set the GNUPGHOME environment variable.
# It can easily be done with python as well. # It can easily be done with python as well.
os.environ["GNUPGHOME"] = "/home/kk/.gnupg/" os.environ["GNUPGHOME"] = "/home/kk/.gnupg/"