nixos/flatpak: add package option

this patch adds the `services.flatpak.package` option to
allow overriding the package added by this module to
`environment.systemPackages` and the likes.

This is useful in scenarios where applications call the
flatpak binary to query information like writable directories
and there is a custom package returning different results
from the vanilla binary.

See https://github.com/crabdancing/nixpak-flatpak-wrapper
This commit is contained in:
networkException
2024-08-04 17:36:41 +02:00
committed by gador
parent 8b869a0cf2
commit 1d66aac7a0
+6 -4
View File
@@ -15,6 +15,8 @@ in {
options = {
services.flatpak = {
enable = mkEnableOption "flatpak";
package = mkPackageOption pkgs "flatpak" { };
};
};
@@ -28,16 +30,16 @@ in {
}
];
environment.systemPackages = [ pkgs.flatpak ];
environment.systemPackages = [ cfg.package ];
security.polkit.enable = true;
fonts.fontDir.enable = true;
services.dbus.packages = [ pkgs.flatpak ];
services.dbus.packages = [ cfg.package ];
systemd.packages = [ pkgs.flatpak ];
systemd.tmpfiles.packages = [ pkgs.flatpak ];
systemd.packages = [ cfg.package ];
systemd.tmpfiles.packages = [ cfg.package ];
environment.profiles = [
"$HOME/.local/share/flatpak/exports"