{ lib, namespace, ... }:
with lib;
{
  options.${namespace}.services.arrs = {
    enable = mkEnableOption "arrs services";

    radarr = {
      enable = mkOption {
        type = types.bool;
        default = false;
      };
      port = mkOption {
        type = types.int;
        default = 7878;
      };
      dataDir = mkOption {
        type = types.str;
        default = "";
      };
    };

    sonarr = {
      enable = mkOption {
        type = types.bool;
        default = false;
      };
      port = mkOption {
        type = types.int;
        default = 8989;
      };
      dataDir = mkOption {
        type = types.str;
        default = "";
      };
    };

    sabnzbd = {
      enable = mkOption {
        type = types.bool;
        default = false;
      };
      port = mkOption {
        type = types.int;
        default = 8280;
      };
      dataDir = mkOption {
        type = types.str;
        default = "";
      };
    };

    deluge = {
      enable = mkOption {
        type = types.bool;
        default = false;
      };
      port = mkOption {
        type = types.int;
        default = 8112;
      };
      dataDir = mkOption {
        type = types.str;
        default = "";
      };
    };

    jackett = {
      enable = mkOption {
        type = types.bool;
        default = false;
      };
      port = mkOption {
        type = types.int;
        default = 9117;
      };
      dataDir = mkOption {
        type = types.str;
        default = "";
      };
    };

    localAddress = mkOption {
      type = types.str;
      default = "127.0.0.1";
    };

    downloadsDir = mkOption {
      type = types.str;
      default = "";
    };

    incompleteDownloadsDir = mkOption {
      type = types.str;
      default = "";
    };

    moviesDir = mkOption {
      type = types.str;
      default = "";
    };

    tvDir = mkOption {
      type = types.str;
      default = "";
    };

    isosDir = mkOption {
      type = types.str;
      default = "";
    };
  };
}
