From 1d66aac7a019f2ea543565cbb502ce4c2b8a1d77 Mon Sep 17 00:00:00 2001 From: networkException Date: Sat, 3 Aug 2024 15:49:33 +0200 Subject: [PATCH] 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 --- nixos/modules/services/desktops/flatpak.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/desktops/flatpak.nix b/nixos/modules/services/desktops/flatpak.nix index cda0a17d0475..b386bafcfe6f 100644 --- a/nixos/modules/services/desktops/flatpak.nix +++ b/nixos/modules/services/desktops/flatpak.nix @@ -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"