{ config, lib, pkgs, ... }:

let cfg = config.sydnix.flatpak;
in {
  options.sydnix.flatpak = {
    enable = lib.mkEnableOption "Flatpak";
  };

  config = lib.mkIf cfg.enable {
    services.flatpak.enable = true;
    sydnix.impermanence.directories = [
      "/var/lib/flatpak"
    ];
  };
}
