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

let
  package = (pkgs.callPackage ./package.nix { });
in
{
  imports = [ ];

  options.me = {
    steam_rom_manager.enable = lib.mkOption {
      type = lib.types.bool;
      default = false;
      example = true;
      description = "Whether we want to install steam_rom_manager.";
    };
  };

  config = lib.mkIf config.me.steam_rom_manager.enable (
    lib.mkMerge [
      (lib.mkIf config.me.graphical {
        home.packages = [
          package
        ];

        me.persist.directories = [ ".config/steam-rom-manager/userData" ];

        # TODO: Install a fully configured /home/deck/.persist/.config/steam-rom-manager/userData/userConfigurations.json (which contains the parser definitions) and /home/deck/.persist/.config/steam-rom-manager/userData/userSettings.json (which contains the applications settings like steam directory).
        # TODO: Maybe only persist /home/deck/.persist/.config/steam-rom-manager/userData/artworkBackups and /home/deck/.persist/.config/steam-rom-manager/userData/artworkCache.json after the parser config is being installed.

        # home.persistence."/home/deck/.state" = {
        #   files = [
        #     ".config/steam-rom-manager/userData/configPresets.json"
        #   ];
        # };

      })
    ]
  );
}
