+ key: :password,
+ type: :string,
+ description: "Password to connect to ES. Set to nil if your cluster is unauthenticated.",
+ suggestion: ["changeme"]
+ },
+ %{
+ key: :api,
+ type: :module,
+ description:
+ "The API module used by Elasticsearch. Should always be Elasticsearch.API.HTTP",
+ suggestion: [Elasticsearch.API.HTTP]
+ },
+ %{
+ key: :json_library,
+ type: :module,
+ description:
+ "The JSON module used to encode/decode when communicating with Elasticsearch",
+ suggestion: [Jason]
+ },
+ %{
+ key: :indexes,
+ type: :map,
+ description: "The indices to set up in Elasticsearch",
+ children: [
+ %{
+ key: :activities,
+ type: :map,
+ description: "Config for the index to use for activities",
+ children: [
+ %{
+ key: :settings,
+ type: :string,
+ description:
+ "Path to the file containing index settings for the activities index. Should contain a mapping.",
+ suggestion: ["priv/es-mappings/activity.json"]
+ },
+ %{
+ key: :store,
+ type: :module,
+ description: "The internal store module",
+ suggestion: [Pleroma.Search.Elasticsearch.Store]
+ },
+ %{
+ key: :sources,
+ type: {:list, :module},
+ description: "The internal types to use for this index",
+ suggestion: [[Pleroma.Activity]]
+ },
+ %{
+ key: :bulk_page_size,
+ type: :integer,
+ description: "Size for bulk put requests, mostly used on building the index",
+ suggestion: [5000]
+ },
+ %{
+ key: :bulk_wait_interval,
+ type: :integer,
+ description: "Time to wait between bulk put requests (in ms)",
+ suggestion: [15_000]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: :translator,
+ type: :group,
+ description: "Translation Settings",
+ children: [
+ %{
+ key: :enabled,
+ type: :boolean,
+ description: "Is translation enabled?",
+ suggestion: [true, false]
+ },
+ %{
+ key: :module,
+ type: :module,
+ description: "Translation module.",
+ suggestions: {:list_behaviour_implementations, Pleroma.Akkoma.Translator}
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: :deepl,
+ label: "DeepL",
+ type: :group,
+ description: "DeepL Settings.",
+ children: [
+ %{
+ key: :tier,
+ type: {:dropdown, :atom},
+ description: "API Tier",
+ suggestions: [:free, :pro]
+ },
+ %{
+ key: :api_key,
+ type: :string,
+ description: "API key for DeepL",
+ suggestions: [nil]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: :libre_translate,
+ type: :group,
+ description: "LibreTranslate Settings.",
+ children: [
+ %{
+ key: :url,
+ type: :string,
+ description: "URL for libretranslate",
+ suggestion: [nil]
+ },
+ %{
+ key: :api_key,
+ type: :string,
+ description: "API key for libretranslate",
+ suggestion: [nil]