update mastofe paths (#95)
[akkoma] / config / description.exs
index 94907aaba35b71bcb994b6df995fb3d3a744ca77..a4f115ce7a38732c0befcd84a8ca5dbe456dd772 100644 (file)
@@ -687,12 +687,14 @@ config :pleroma, :config_description, [
       },
       %{
         key: :quarantined_instances,
-        type: {:list, :string},
+        type: {:list, :tuple},
+        key_placeholder: "instance",
+        value_placeholder: "reason",
         description:
-          "List of ActivityPub instances where private (DMs, followers-only) activities will not be sent",
+          "List of ActivityPub instances where private (DMs, followers-only) activities will not be sent and the reason for doing so",
         suggestions: [
-          "quarantined.com",
-          "*.quarantined.com"
+          {"quarantined.com", "Reason"},
+          {"*.quarantined.com", "Reason"}
         ]
       },
       %{
@@ -934,6 +936,17 @@ config :pleroma, :config_description, [
         key: :show_reactions,
         type: :boolean,
         description: "Let favourites and emoji reactions be viewed through the API."
+      },
+      %{
+        key: :profile_directory,
+        type: :boolean,
+        description: "Enable profile directory."
+      },
+      %{
+        key: :privileged_staff,
+        type: :boolean,
+        description:
+          "Let moderators access sensitive data (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)"
       }
     ]
   },
@@ -1162,7 +1175,7 @@ config :pleroma, :config_description, [
     type: :group,
     description:
       "This form can be used to configure a keyword list that keeps the configuration data for any " <>
-        "kind of frontend. By default, settings for pleroma_fe are configured. If you want to " <>
+        "kind of frontend. By default, settings for pleroma_fe and masto_fe are configured. If you want to " <>
         "add your own configuration your settings all fields must be complete.",
     children: [
       %{
@@ -1362,6 +1375,25 @@ config :pleroma, :config_description, [
             suggestions: ["pleroma-dark"]
           }
         ]
+      },
+      %{
+        key: :masto_fe,
+        label: "Masto FE",
+        type: :map,
+        description: "Settings for Masto FE",
+        suggestions: [
+          %{
+            showInstanceSpecificPanel: true
+          }
+        ],
+        children: [
+          %{
+            key: :showInstanceSpecificPanel,
+            label: "Show instance specific panel",
+            type: :boolean,
+            description: "Whenether to show the instance's specific panel"
+          }
+        ]
       }
     ]
   },
@@ -1619,38 +1651,6 @@ config :pleroma, :config_description, [
       }
     ]
   },
-  %{
-    group: :pleroma,
-    key: :gopher,
-    type: :group,
-    description: "Gopher settings",
-    children: [
-      %{
-        key: :enabled,
-        type: :boolean,
-        description: "Enables the gopher interface"
-      },
-      %{
-        key: :ip,
-        label: "IP",
-        type: :tuple,
-        description: "IP address to bind to",
-        suggestions: [{0, 0, 0, 0}]
-      },
-      %{
-        key: :port,
-        type: :integer,
-        description: "Port to bind to",
-        suggestions: [9999]
-      },
-      %{
-        key: :dstport,
-        type: :integer,
-        description: "Port advertised in URLs (optional, defaults to port)",
-        suggestions: [9999]
-      }
-    ]
-  },
   %{
     group: :pleroma,
     key: :activitypub,
@@ -1668,6 +1668,11 @@ config :pleroma, :config_description, [
         type: :boolean,
         description: "Whether to federate blocks to other instances"
       },
+      %{
+        key: :blockers_visible,
+        type: :boolean,
+        description: "Whether a user can see someone who has blocked them"
+      },
       %{
         key: :sign_object_fetches,
         type: :boolean,
@@ -1684,6 +1689,13 @@ config :pleroma, :config_description, [
         type: :integer,
         description: "Following handshake timeout",
         suggestions: [500]
+      },
+      %{
+        key: :max_collection_objects,
+        type: :integer,
+        description:
+          "The maximum number of items to fetch from a remote collections. Setting this too low can lead to only getting partial collections, but too high and you can end up fetching far too many objects.",
+        suggestions: [50]
       }
     ]
   },
@@ -1967,6 +1979,21 @@ config :pleroma, :config_description, [
       }
     ]
   },
+  %{
+    group: :pleroma,
+    key: Pleroma.Web.Metadata.Providers.Theme,
+    type: :group,
+    description: "Specific provider to hand out themes to instances that scrape index.html",
+    children: [
+      %{
+        key: :theme_color,
+        type: :string,
+        description:
+          "The 'accent color' of the instance, used in places like misskey's instance ticker",
+        suggestions: ["#593196"]
+      }
+    ]
+  },
   %{
     group: :pleroma,
     key: :rich_media,
@@ -2131,104 +2158,6 @@ config :pleroma, :config_description, [
       }
     ]
   },
-  %{
-    group: :pleroma,
-    key: :ldap,
-    label: "LDAP",
-    type: :group,
-    description:
-      "Use LDAP for user authentication. When a user logs in to the Pleroma instance, the name and password" <>
-        " will be verified by trying to authenticate (bind) to a LDAP server." <>
-        " If a user exists in the LDAP directory but there is no account with the same name yet on the" <>
-        " Pleroma instance then a new Pleroma account will be created with the same name as the LDAP user name.",
-    children: [
-      %{
-        key: :enabled,
-        type: :boolean,
-        description: "Enables LDAP authentication"
-      },
-      %{
-        key: :host,
-        type: :string,
-        description: "LDAP server hostname",
-        suggestions: ["localhosts"]
-      },
-      %{
-        key: :port,
-        type: :integer,
-        description: "LDAP port, e.g. 389 or 636",
-        suggestions: [389, 636]
-      },
-      %{
-        key: :ssl,
-        label: "SSL",
-        type: :boolean,
-        description: "Enable to use SSL, usually implies the port 636"
-      },
-      %{
-        key: :sslopts,
-        label: "SSL options",
-        type: :keyword,
-        description: "Additional SSL options",
-        suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
-        children: [
-          %{
-            key: :cacertfile,
-            type: :string,
-            description: "Path to file with PEM encoded cacerts",
-            suggestions: ["path/to/file/with/PEM/cacerts"]
-          },
-          %{
-            key: :verify,
-            type: :atom,
-            description: "Type of cert verification",
-            suggestions: [:verify_peer]
-          }
-        ]
-      },
-      %{
-        key: :tls,
-        label: "TLS",
-        type: :boolean,
-        description: "Enable to use STARTTLS, usually implies the port 389"
-      },
-      %{
-        key: :tlsopts,
-        label: "TLS options",
-        type: :keyword,
-        description: "Additional TLS options",
-        suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
-        children: [
-          %{
-            key: :cacertfile,
-            type: :string,
-            description: "Path to file with PEM encoded cacerts",
-            suggestions: ["path/to/file/with/PEM/cacerts"]
-          },
-          %{
-            key: :verify,
-            type: :atom,
-            description: "Type of cert verification",
-            suggestions: [:verify_peer]
-          }
-        ]
-      },
-      %{
-        key: :base,
-        type: :string,
-        description: "LDAP base, e.g. \"dc=example,dc=com\"",
-        suggestions: ["dc=example,dc=com"]
-      },
-      %{
-        key: :uid,
-        label: "UID",
-        type: :string,
-        description:
-          "LDAP attribute name to authenticate the user, e.g. when \"cn\", the filter will be \"cn=username,base\"",
-        suggestions: ["cn"]
-      }
-    ]
-  },
   %{
     group: :pleroma,
     key: :auth,
@@ -2530,45 +2459,6 @@ config :pleroma, :config_description, [
       }
     ]
   },
-  %{
-    group: :esshd,
-    label: "ESSHD",
-    type: :group,
-    description:
-      "Before enabling this you must add :esshd to mix.exs as one of the extra_applications " <>
-        "and generate host keys in your priv dir with ssh-keygen -m PEM -N \"\" -b 2048 -t rsa -f ssh_host_rsa_key",
-    children: [
-      %{
-        key: :enabled,
-        type: :boolean,
-        description: "Enables SSH"
-      },
-      %{
-        key: :priv_dir,
-        type: :string,
-        description: "Dir with SSH keys",
-        suggestions: ["/some/path/ssh_keys"]
-      },
-      %{
-        key: :handler,
-        type: :string,
-        description: "Handler module",
-        suggestions: ["Pleroma.BBS.Handler"]
-      },
-      %{
-        key: :port,
-        type: :integer,
-        description: "Port to connect",
-        suggestions: [10_022]
-      },
-      %{
-        key: :password_authenticator,
-        type: :string,
-        description: "Authenticator module",
-        suggestions: ["Pleroma.BBS.Authenticator"]
-      }
-    ]
-  },
   %{
     group: :mime,
     label: "Mime Types",
@@ -2652,10 +2542,6 @@ config :pleroma, :config_description, [
         description: "Proxy URL",
         suggestions: ["localhost:9020", {:socks5, :localhost, 3090}]
       },
-      %{
-        key: :send_user_agent,
-        type: :boolean
-      },
       %{
         key: :user_agent,
         type: [:string, :atom],
@@ -2968,147 +2854,6 @@ config :pleroma, :config_description, [
       }
     ]
   },
-  %{
-    group: :pleroma,
-    key: :connections_pool,
-    type: :group,
-    description: "Advanced settings for `Gun` connections pool",
-    children: [
-      %{
-        key: :connection_acquisition_wait,
-        type: :integer,
-        description:
-          "Timeout to acquire a connection from pool. The total max time is this value multiplied by the number of retries. Default: 250ms.",
-        suggestions: [250]
-      },
-      %{
-        key: :connection_acquisition_retries,
-        type: :integer,
-        description:
-          "Number of attempts to acquire the connection from the pool if it is overloaded. Default: 5",
-        suggestions: [5]
-      },
-      %{
-        key: :max_connections,
-        type: :integer,
-        description: "Maximum number of connections in the pool. Default: 250 connections.",
-        suggestions: [250]
-      },
-      %{
-        key: :connect_timeout,
-        type: :integer,
-        description: "Timeout while `gun` will wait until connection is up. Default: 5000ms.",
-        suggestions: [5000]
-      },
-      %{
-        key: :reclaim_multiplier,
-        type: :integer,
-        description:
-          "Multiplier for the number of idle connection to be reclaimed if the pool is full. For example if the pool maxes out at 250 connections and this setting is set to 0.3, the pool will reclaim at most 75 idle connections if it's overloaded. Default: 0.1",
-        suggestions: [0.1]
-      }
-    ]
-  },
-  %{
-    group: :pleroma,
-    key: :pools,
-    type: :group,
-    description: "Advanced settings for `Gun` workers pools",
-    children:
-      Enum.map([:federation, :media, :upload, :default], fn pool_name ->
-        %{
-          key: pool_name,
-          type: :keyword,
-          description: "Settings for #{pool_name} pool.",
-          children: [
-            %{
-              key: :size,
-              type: :integer,
-              description: "Maximum number of concurrent requests in the pool.",
-              suggestions: [50]
-            },
-            %{
-              key: :max_waiting,
-              type: :integer,
-              description:
-                "Maximum number of requests waiting for other requests to finish. After this number is reached, the pool will start returning errrors when a new request is made",
-              suggestions: [10]
-            },
-            %{
-              key: :recv_timeout,
-              type: :integer,
-              description: "Timeout for the pool while gun will wait for response",
-              suggestions: [10_000]
-            }
-          ]
-        }
-      end)
-  },
-  %{
-    group: :pleroma,
-    key: :hackney_pools,
-    type: :group,
-    description: "Advanced settings for `Hackney` connections pools",
-    children: [
-      %{
-        key: :federation,
-        type: :keyword,
-        description: "Settings for federation pool.",
-        children: [
-          %{
-            key: :max_connections,
-            type: :integer,
-            description: "Number workers in the pool.",
-            suggestions: [50]
-          },
-          %{
-            key: :timeout,
-            type: :integer,
-            description: "Timeout while `hackney` will wait for response.",
-            suggestions: [150_000]
-          }
-        ]
-      },
-      %{
-        key: :media,
-        type: :keyword,
-        description: "Settings for media pool.",
-        children: [
-          %{
-            key: :max_connections,
-            type: :integer,
-            description: "Number workers in the pool.",
-            suggestions: [50]
-          },
-          %{
-            key: :timeout,
-            type: :integer,
-            description: "Timeout while `hackney` will wait for response.",
-            suggestions: [150_000]
-          }
-        ]
-      },
-      %{
-        key: :upload,
-        type: :keyword,
-        description: "Settings for upload pool.",
-        children: [
-          %{
-            key: :max_connections,
-            type: :integer,
-            description: "Number workers in the pool.",
-            suggestions: [25]
-          },
-          %{
-            key: :timeout,
-            type: :integer,
-            description: "Timeout while `hackney` will wait for response.",
-            suggestions: [300_000]
-          }
-        ]
-      }
-    ]
-  },
   %{
     group: :pleroma,
     key: :restrict_unauthenticated,
@@ -3246,6 +2991,27 @@ config :pleroma, :config_description, [
         description: "Admin frontend",
         children: installed_frontend_options
       },
+      %{
+        key: :mastodon,
+        type: :map,
+        description: "Mastodon frontend",
+        children: installed_frontend_options
+      },
+      %{
+        key: :swagger,
+        type: :map,
+        description: "Swagger API reference frontend",
+        children:
+          installed_frontend_options ++
+            [
+              %{
+                key: "enabled",
+                label: "Enabled",
+                type: :boolean,
+                description: "Whether to have this enabled at all"
+              }
+            ]
+      },
       %{
         key: :available,
         type: :map,
@@ -3392,5 +3158,133 @@ config :pleroma, :config_description, [
         ]
       }
     ]
+  },
+  %{
+    group: :pleroma,
+    key: Pleroma.Search,
+    type: :group,
+    description: "General search settings.",
+    children: [
+      %{
+        key: :module,
+        type: :keyword,
+        description: "Selected search module.",
+        suggestion: [Pleroma.Search.DatabaseSearch, Pleroma.Search.Meilisearch]
+      }
+    ]
+  },
+  %{
+    group: :pleroma,
+    key: Pleroma.Search.Meilisearch,
+    type: :group,
+    description: "Meilisearch settings.",
+    children: [
+      %{
+        key: :url,
+        type: :string,
+        description: "Meilisearch URL.",
+        suggestion: ["http://127.0.0.1:7700/"]
+      },
+      %{
+        key: :private_key,
+        type: :string,
+        description:
+          "Private key for meilisearch authentication, or `nil` to disable private key authentication.",
+        suggestion: [nil]
+      },
+      %{
+        key: :initial_indexing_chunk_size,
+        type: :int,
+        description:
+          "Amount of posts in a batch when running the initial indexing operation. Should probably not be more than 100000" <>
+            " since there's a limit on maximum insert size",
+        suggestion: [100_000]
+      }
+    ]
+  },
+  %{
+    group: :pleroma,
+    key: Pleroma.Search.Elasticsearch.Cluster,
+    type: :group,
+    description: "Elasticsearch settings.",
+    children: [
+      %{
+        key: :url,
+        type: :string,
+        description: "Elasticsearch URL.",
+        suggestion: ["http://127.0.0.1:9200/"]
+      },
+      %{
+        key: :username,
+        type: :string,
+        description: "Username to connect to ES. Set to nil if your cluster is unauthenticated.",
+        suggestion: ["elastic"]
+      },
+      %{
+        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: :int,
+                description: "Size for bulk put requests, mostly used on building the index",
+                suggestion: [5000]
+              },
+              %{
+                key: :bulk_wait_interval,
+                type: :int,
+                description: "Time to wait between bulk put requests (in ms)",
+                suggestion: [15_000]
+              }
+            ]
+          }
+        ]
+      }
+    ]
   }
 ]