summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/benchmark.exs4
-rw-r--r--config/config.exs273
-rw-r--r--config/description.exs1253
-rw-r--r--config/dev.exs2
-rw-r--r--config/test.exs37
5 files changed, 1235 insertions, 334 deletions
diff --git a/config/benchmark.exs b/config/benchmark.exs
index 84c6782a2..e867253eb 100644
--- a/config/benchmark.exs
+++ b/config/benchmark.exs
@@ -39,7 +39,7 @@ config :pleroma, Pleroma.Repo,
adapter: Ecto.Adapters.Postgres,
username: "postgres",
password: "postgres",
- database: "pleroma_test",
+ database: "pleroma_benchmark",
hostname: System.get_env("DB_HOST") || "localhost",
pool_size: 10
@@ -61,8 +61,6 @@ config :web_push_encryption, :vapid_details,
config :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock
-config :pleroma_job_queue, disabled: true
-
config :pleroma, Pleroma.ScheduledActivity,
daily_user_limit: 2,
total_user_limit: 3,
diff --git a/config/config.exs b/config/config.exs
index 5eb1c7583..246712b9f 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -58,20 +58,6 @@ config :pleroma, Pleroma.Captcha,
config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
-config :pleroma, :hackney_pools,
- federation: [
- max_connections: 50,
- timeout: 150_000
- ],
- media: [
- max_connections: 50,
- timeout: 150_000
- ],
- upload: [
- max_connections: 25,
- timeout: 300_000
- ]
-
# Upload configuration
config :pleroma, Pleroma.Upload,
uploader: Pleroma.Uploaders.Local,
@@ -85,7 +71,9 @@ config :pleroma, Pleroma.Upload,
follow_redirect: true,
pool: :upload
]
- ]
+ ],
+ filename_display_max_length: 30,
+ default_description: nil
config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
@@ -110,6 +98,7 @@ config :pleroma, :uri_schemes,
"dat",
"dweb",
"gopher",
+ "hyper",
"ipfs",
"ipns",
"irc",
@@ -190,14 +179,18 @@ config :tesla, adapter: Tesla.Adapter.Hackney
config :pleroma, :http,
proxy_url: nil,
send_user_agent: true,
- user_agent: :default
+ user_agent: :default,
+ adapter: []
config :pleroma, :instance,
name: "Pleroma",
email: "example@example.com",
notify_email: "noreply@example.com",
- description: "A Pleroma instance, an alternative fediverse server",
+ description: "Pleroma: An efficient and flexible fediverse server",
+ background_image: "/images/city.jpg",
+ instance_thumbnail: "/instance/thumbnail.jpeg",
limit: 5_000,
+ description_limit: 5_000,
chat_limit: 5_000,
remote_limit: 100_000,
upload_limit: 16_000_000,
@@ -213,6 +206,7 @@ config :pleroma, :instance,
registrations_open: true,
invites_enabled: false,
account_activation_required: false,
+ account_approval_required: false,
federating: true,
federation_incoming_replies_max_depth: 100,
federation_reachability_timeout_days: 7,
@@ -220,7 +214,6 @@ config :pleroma, :instance,
Pleroma.Web.ActivityPub.Publisher
],
allow_relay: true,
- rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
public: true,
quarantined_instances: [],
managed_config: true,
@@ -231,13 +224,9 @@ config :pleroma, :instance,
"text/markdown",
"text/bbcode"
],
- mrf_transparency: true,
- mrf_transparency_exclusions: [],
autofollowed_nicknames: [],
max_pinned_statuses: 1,
attachment_links: false,
- welcome_user_nickname: nil,
- welcome_message: nil,
max_report_comment_size: 1000,
safe_dm_mentions: false,
healthcheck: false,
@@ -250,9 +239,41 @@ config :pleroma, :instance,
max_remote_account_fields: 20,
account_field_name_length: 512,
account_field_value_length: 2048,
+ registration_reason_length: 500,
external_user_synchronization: true,
extended_nickname_format: true,
- cleanup_attachments: false
+ cleanup_attachments: false,
+ multi_factor_authentication: [
+ totp: [
+ # digits 6 or 8
+ digits: 6,
+ period: 30
+ ],
+ backup_codes: [
+ number: 5,
+ length: 16
+ ]
+ ],
+ show_reactions: true
+
+config :pleroma, :welcome,
+ direct_message: [
+ enabled: false,
+ sender_nickname: nil,
+ message: nil
+ ],
+ chat_message: [
+ enabled: false,
+ sender_nickname: nil,
+ message: nil
+ ],
+ email: [
+ enabled: false,
+ sender: nil,
+ subject: "Welcome to <%= instance_name %>",
+ html: "Welcome to <%= instance_name %>",
+ text: "Welcome to <%= instance_name %>"
+ ]
config :pleroma, :feed,
post_title: %{
@@ -274,20 +295,33 @@ config :pleroma, :markup,
config :pleroma, :frontend_configurations,
pleroma_fe: %{
- theme: "pleroma-dark",
- logo: "/static/logo.png",
+ alwaysShowSubjectInput: true,
background: "/images/city.jpg",
- redirectRootNoLogin: "/main/all",
- redirectRootLogin: "/main/friends",
- showInstanceSpecificPanel: true,
- scopeOptionsEnabled: false,
- formattingOptionsEnabled: false,
collapseMessageWithSubject: false,
+ disableChat: false,
+ greentext: false,
+ hideFilteredStatuses: false,
+ hideMutedPosts: false,
hidePostStats: false,
+ hideSitename: false,
hideUserStats: false,
+ loginMethod: "password",
+ logo: "/static/logo.png",
+ logoMargin: ".1em",
+ logoMask: true,
+ minimalScopesMode: false,
+ noAttachmentLinks: false,
+ nsfwCensorImage: "",
+ postContentType: "text/plain",
+ redirectRootLogin: "/main/friends",
+ redirectRootNoLogin: "/main/all",
scopeCopy: true,
+ sidebarRight: false,
+ showFeaturesPanel: true,
+ showInstanceSpecificPanel: false,
subjectLineBehavior: "email",
- alwaysShowSubjectInput: true
+ theme: "pleroma-dark",
+ webPushNotifications: false
},
masto_fe: %{
showInstanceSpecificPanel: true
@@ -346,9 +380,11 @@ config :pleroma, :mrf_simple,
federated_timeline_removal: [],
report_removal: [],
reject: [],
+ followers_only: [],
accept: [],
avatar_removal: [],
- banner_removal: []
+ banner_removal: [],
+ reject_deletes: []
config :pleroma, :mrf_keyword,
reject: [],
@@ -357,12 +393,15 @@ config :pleroma, :mrf_keyword,
config :pleroma, :mrf_subchain, match_actor: %{}
+config :pleroma, :mrf_activity_expiration, days: 365
+
config :pleroma, :mrf_vocabulary,
accept: [],
reject: []
+# threshold of 7 days
config :pleroma, :mrf_object_age,
- threshold: 172_800,
+ threshold: 604_800,
actions: [:delist, :strip_followers]
config :pleroma, :rich_media,
@@ -371,13 +410,16 @@ config :pleroma, :rich_media,
ignore_tld: ["local", "localdomain", "lan"],
parsers: [
Pleroma.Web.RichMedia.Parsers.TwitterCard,
- Pleroma.Web.RichMedia.Parsers.OGP,
Pleroma.Web.RichMedia.Parsers.OEmbed
],
ttl_setters: [Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl]
config :pleroma, :media_proxy,
enabled: false,
+ invalidation: [
+ enabled: false,
+ provider: Pleroma.Web.MediaProxy.Invalidation.Script
+ ],
proxy_opts: [
redirect_on_failure: false,
max_body_length: 25 * 1_048_576,
@@ -388,6 +430,13 @@ config :pleroma, :media_proxy,
],
whitelist: []
+config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,
+ method: :purge,
+ headers: [],
+ options: []
+
+config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script, script_path: nil
+
config :pleroma, :chat, enabled: true
config :phoenix, :format_encoders, json: Jason
@@ -410,6 +459,11 @@ config :pleroma, Pleroma.Web.Metadata,
],
unfurl_nsfw: false
+config :pleroma, Pleroma.Web.Preload,
+ providers: [
+ Pleroma.Web.Preload.Providers.Instance
+ ]
+
config :pleroma, :http_security,
enabled: true,
sts: false,
@@ -462,13 +516,19 @@ config :pleroma, Pleroma.User,
"user-search",
"user_exists",
"users",
- "web"
- ]
+ "web",
+ "verify_credentials",
+ "update_credentials",
+ "relationships",
+ "search",
+ "confirmation_resend",
+ "mfa"
+ ],
+ email_blacklist: []
config :pleroma, Oban,
repo: Pleroma.Repo,
- verbose: false,
- prune: {:maxlen, 1500},
+ log: false,
queues: [
activity_expiration: 10,
federator_incoming: 50,
@@ -482,6 +542,7 @@ config :pleroma, Oban,
attachments_cleanup: 5,
new_users_digest: 1
],
+ plugins: [Oban.Plugins.Pruner],
crontab: [
{"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker},
{"0 * * * *", Pleroma.Workers.Cron.StatsWorker},
@@ -496,16 +557,14 @@ config :pleroma, :workers,
federator_outgoing: 5
]
-config :auto_linker,
- opts: [
- extra: true,
- # TODO: Set to :no_scheme when it works properly
- validate_tld: true,
- class: false,
- strip_prefix: false,
- new_window: false,
- rel: "ugc"
- ]
+config :pleroma, Pleroma.Formatter,
+ class: false,
+ rel: "ugc",
+ new_window: false,
+ truncate: false,
+ strip_prefix: false,
+ extra: true,
+ validate_tld: :no_scheme
config :pleroma, :ldap,
enabled: System.get_env("LDAP_ENABLED") == "true",
@@ -604,6 +663,59 @@ config :pleroma, Pleroma.Plugs.RemoteIp, enabled: true
config :pleroma, :static_fe, enabled: false
+# Example of frontend configuration
+# This example will make us serve the primary frontend from the
+# frontends directory within your `:pleroma, :instance, static_dir`.
+# e.g., instance/static/frontends/pleroma/develop/
+#
+# With no frontend configuration, the bundled files from the `static` directory will
+# be used.
+#
+# config :pleroma, :frontends,
+# primary: %{"name" => "pleroma-fe", "ref" => "develop"},
+# admin: %{"name" => "admin-fe", "ref" => "stable"},
+# available: %{...}
+
+config :pleroma, :frontends,
+ available: %{
+ "kenoma" => %{
+ "name" => "kenoma",
+ "git" => "https://git.pleroma.social/lambadalambda/kenoma",
+ "build_url" =>
+ "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build",
+ "ref" => "master"
+ },
+ "pleroma-fe" => %{
+ "name" => "pleroma-fe",
+ "git" => "https://git.pleroma.social/pleroma/pleroma-fe",
+ "build_url" =>
+ "https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/${ref}/download?job=build",
+ "ref" => "develop"
+ },
+ "fedi-fe" => %{
+ "name" => "fedi-fe",
+ "git" => "https://git.pleroma.social/pleroma/fedi-fe",
+ "build_url" =>
+ "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build",
+ "ref" => "master"
+ },
+ "admin-fe" => %{
+ "name" => "admin-fe",
+ "git" => "https://git.pleroma.social/pleroma/admin-fe",
+ "build_url" =>
+ "https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build",
+ "ref" => "develop"
+ },
+ "soapbox-fe" => %{
+ "name" => "soapbox-fe",
+ "git" => "https://gitlab.com/soapbox-pub/soapbox-fe",
+ "build_url" =>
+ "https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/${ref}/download?job=build-production",
+ "ref" => "v1.0.0",
+ "build_dir" => "static"
+ }
+ }
+
config :pleroma, :web_cache_ttl,
activity_pub: nil,
activity_pub_question: 30_000
@@ -616,6 +728,71 @@ config :pleroma, Pleroma.Repo,
parameters: [gin_fuzzy_search_limit: "500"],
prepare: :unnamed
+config :pleroma, :connections_pool,
+ reclaim_multiplier: 0.1,
+ connection_acquisition_wait: 250,
+ connection_acquisition_retries: 5,
+ max_connections: 250,
+ max_idle_time: 30_000,
+ retry: 0,
+ await_up_timeout: 5_000
+
+config :pleroma, :pools,
+ federation: [
+ size: 50,
+ max_waiting: 10
+ ],
+ media: [
+ size: 50,
+ max_waiting: 10
+ ],
+ upload: [
+ size: 25,
+ max_waiting: 5
+ ],
+ default: [
+ size: 10,
+ max_waiting: 2
+ ]
+
+config :pleroma, :hackney_pools,
+ federation: [
+ max_connections: 50,
+ timeout: 150_000
+ ],
+ media: [
+ max_connections: 50,
+ timeout: 150_000
+ ],
+ upload: [
+ max_connections: 25,
+ timeout: 300_000
+ ]
+
+private_instance? = :if_instance_is_private
+
+config :pleroma, :restrict_unauthenticated,
+ timelines: %{local: private_instance?, federated: private_instance?},
+ profiles: %{local: private_instance?, remote: private_instance?},
+ activities: %{local: private_instance?, remote: private_instance?}
+
+config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false
+
+config :pleroma, :mrf,
+ policies: Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy,
+ transparency: true,
+ transparency_exclusions: []
+
+config :tzdata, :http_client, Pleroma.HTTP.Tzdata
+
+config :ex_aws, http_client: Pleroma.HTTP.ExAws
+
+config :pleroma, :instances_favicons, enabled: false
+
+config :floki, :html_parser, Floki.HTMLParser.FastHtml
+
+config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator
+
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{Mix.env()}.exs"
diff --git a/config/description.exs b/config/description.exs
index 37cb548ff..29a657333 100644
--- a/config/description.exs
+++ b/config/description.exs
@@ -12,6 +12,55 @@ websocket_config = [
compress: false
]
+installed_frontend_options = [
+ %{
+ key: "name",
+ label: "Name",
+ type: :string,
+ description:
+ "Name of the installed frontend. Valid config must include both `Name` and `Reference` values."
+ },
+ %{
+ key: "ref",
+ label: "Reference",
+ type: :string,
+ description:
+ "Reference of the installed frontend to be used. Valid config must include both `Name` and `Reference` values."
+ }
+]
+
+frontend_options = [
+ %{
+ key: "name",
+ label: "Name",
+ type: :string,
+ description: "Name of the frontend."
+ },
+ %{
+ key: "ref",
+ label: "Reference",
+ type: :string,
+ description: "Reference of the frontend to be used."
+ },
+ %{
+ key: "git",
+ type: :string,
+ description: "URL of the git repository of the frontend"
+ },
+ %{
+ key: "build_url",
+ type: :string,
+ description:
+ "Either an url to a zip file containing the frontend or a template to build it by inserting the `ref`. The string `${ref}` will be replaced by the configured `ref`.",
+ example: "https://some.url/builds/${ref}.zip"
+ },
+ %{
+ key: "build_dir",
+ type: :string,
+ description: "The directory inside the zip file "
+ }
+]
+
config :pleroma, :config_description, [
%{
group: :pleroma,
@@ -23,28 +72,26 @@ config :pleroma, :config_description, [
key: :uploader,
type: :module,
description: "Module which will be used for uploads",
- suggestions: [Pleroma.Uploaders.Local, Pleroma.Uploaders.S3]
+ suggestions: {:list_behaviour_implementations, Pleroma.Uploaders.Uploader}
},
%{
key: :filters,
type: {:list, :module},
- description: "List of filter modules for uploads",
- suggestions:
- Generator.list_modules_in_dir(
- "lib/pleroma/upload/filter",
- "Elixir.Pleroma.Upload.Filter."
- )
+ description:
+ "List of filter modules for uploads. Module names are shortened (removed leading `Pleroma.Upload.Filter.` part), but on adding custom module you need to use full name.",
+ suggestions: {:list_behaviour_implementations, Pleroma.Upload.Filter}
},
%{
key: :link_name,
type: :boolean,
description:
- "If enabled, a name parameter will be added to the url of the upload. For example `https://instance.tld/media/imagehash.png?name=realname.png`."
+ "If enabled, a name parameter will be added to the URL of the upload. For example `https://instance.tld/media/imagehash.png?name=realname.png`."
},
%{
key: :base_url,
+ label: "Base URL",
type: :string,
- description: "Base url for the uploads, needed if you use CDN",
+ description: "Base URL for the uploads, needed if you use CDN",
suggestions: [
"https://cdn-host.com"
]
@@ -57,6 +104,7 @@ config :pleroma, :config_description, [
},
%{
key: :proxy_opts,
+ label: "Proxy Options",
type: :keyword,
description: "Options for Pleroma.ReverseProxy",
suggestions: [
@@ -84,6 +132,7 @@ config :pleroma, :config_description, [
},
%{
key: :http,
+ label: "HTTP",
type: :keyword,
description: "HTTP options",
children: [
@@ -118,6 +167,11 @@ config :pleroma, :config_description, [
]
}
]
+ },
+ %{
+ key: :filename_display_max_length,
+ type: :integer,
+ description: "Set max length of a filename to display. 0 = no limit. Default: 30"
}
]
},
@@ -187,7 +241,9 @@ config :pleroma, :config_description, [
%{
key: :args,
type: [:string, {:list, :string}, {:list, :tuple}],
- description: "List of actions for the mogrify command",
+ description:
+ "List of actions for the mogrify command. It's possible to add self-written settings as string. " <>
+ "For example `auto-orient, strip, {\"resize\", \"3840x1080>\"}` value will be parsed into valid list of the settings.",
suggestions: [
"strip",
"auto-orient",
@@ -473,6 +529,7 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :uri_schemes,
+ label: "URI Schemes",
type: :group,
description: "URI schemes related settings",
children: [
@@ -486,6 +543,7 @@ config :pleroma, :config_description, [
"dat",
"dweb",
"gopher",
+ "hyper",
"ipfs",
"ipns",
"irc",
@@ -645,17 +703,22 @@ config :pleroma, :config_description, [
key: :invites_enabled,
type: :boolean,
description:
- "Enable user invitations for admins (depends on `registrations_open` being disabled)."
+ "Enable user invitations for admins (depends on `registrations_open` being disabled)"
},
%{
key: :account_activation_required,
type: :boolean,
- description: "Require users to confirm their emails before signing in."
+ description: "Require users to confirm their emails before signing in"
+ },
+ %{
+ key: :account_approval_required,
+ type: :boolean,
+ description: "Require users to be manually approved by an admin before signing in"
},
%{
key: :federating,
type: :boolean,
- description: "Enable federation with other instances."
+ description: "Enable federation with other instances"
},
%{
key: :federation_incoming_replies_max_depth,
@@ -673,46 +736,29 @@ config :pleroma, :config_description, [
label: "Fed. reachability timeout days",
type: :integer,
description:
- "Timeout (in days) of each external federation target being unreachable prior to pausing federating to it.",
+ "Timeout (in days) of each external federation target being unreachable prior to pausing federating to it",
suggestions: [
7
]
},
%{
- key: :federation_publisher_modules,
- type: {:list, :module},
- description: "List of modules for federation publishing",
- suggestions: [
- Pleroma.Web.ActivityPub.Publisher
- ]
- },
- %{
key: :allow_relay,
type: :boolean,
description: "Enable Pleroma's Relay, which makes it possible to follow a whole instance"
},
%{
- key: :rewrite_policy,
- type: [:module, {:list, :module}],
- description: "A list of MRF policies enabled",
- suggestions:
- Generator.list_modules_in_dir(
- "lib/pleroma/web/activity_pub/mrf",
- "Elixir.Pleroma.Web.ActivityPub.MRF."
- )
- },
- %{
key: :public,
type: :boolean,
description:
- "Makes the client API in authentificated mode-only except for user-profiles." <>
- " Useful for disabling the Local Timeline and The Whole Known Network."
+ "Makes the client API in authenticated mode-only except for user-profiles." <>
+ " Useful for disabling the Local Timeline and The Whole Known Network. " <>
+ " Note: when setting to `false`, please also check `:restrict_unauthenticated` setting."
},
%{
key: :quarantined_instances,
type: {:list, :string},
description:
- "List of ActivityPub instances where private (DMs, followers-only) activities will not be send",
+ "List of ActivityPub instances where private (DMs, followers-only) activities will not be sent",
suggestions: [
"quarantined.com",
"*.quarantined.com"
@@ -744,23 +790,6 @@ config :pleroma, :config_description, [
]
},
%{
- key: :mrf_transparency,
- label: "MRF transparency",
- type: :boolean,
- description:
- "Make the content of your Message Rewrite Facility settings public (via nodeinfo)"
- },
- %{
- key: :mrf_transparency_exclusions,
- label: "MRF transparency exclusions",
- type: {:list, :string},
- description:
- "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.",
- suggestions: [
- "exclusion.com"
- ]
- },
- %{
key: :extended_nickname_format,
type: :boolean,
description:
@@ -804,23 +833,6 @@ config :pleroma, :config_description, [
description: "Enable to automatically add attachment link text to statuses"
},
%{
- key: :welcome_message,
- type: :string,
- description:
- "A message that will be sent to a newly registered users as a direct message",
- suggestions: [
- "Hi, @username! Welcome on board!"
- ]
- },
- %{
- key: :welcome_user_nickname,
- type: :string,
- description: "The nickname of the local user that sends the welcome message",
- suggestions: [
- "lain"
- ]
- },
- %{
key: :max_report_comment_size,
type: :integer,
description: "The maximum size of the report comment. Default: 1000.",
@@ -830,6 +842,7 @@ config :pleroma, :config_description, [
},
%{
key: :safe_dm_mentions,
+ label: "Safe DM mentions",
type: :boolean,
description:
"If enabled, only mentions at the beginning of a post will be used to address people in direct messages." <>
@@ -869,7 +882,7 @@ config :pleroma, :config_description, [
%{
key: :skip_thread_containment,
type: :boolean,
- description: "Skip filtering out broken threads. Default: enabled"
+ description: "Skip filtering out broken threads. Default: enabled."
},
%{
key: :limit_to_local_content,
@@ -916,9 +929,193 @@ config :pleroma, :config_description, [
]
},
%{
+ key: :registration_reason_length,
+ type: :integer,
+ description: "Maximum registration reason length. Default: 500.",
+ suggestions: [
+ 500
+ ]
+ },
+ %{
key: :external_user_synchronization,
type: :boolean,
description: "Enabling following/followers counters synchronization for external users"
+ },
+ %{
+ key: :multi_factor_authentication,
+ type: :keyword,
+ description: "Multi-factor authentication settings",
+ suggestions: [
+ [
+ totp: [digits: 6, period: 30],
+ backup_codes: [number: 5, length: 16]
+ ]
+ ],
+ children: [
+ %{
+ key: :totp,
+ label: "TOTP settings",
+ type: :keyword,
+ description: "TOTP settings",
+ suggestions: [digits: 6, period: 30],
+ children: [
+ %{
+ key: :digits,
+ type: :integer,
+ suggestions: [6],
+ description:
+ "Determines the length of a one-time pass-code, in characters. Defaults to 6 characters."
+ },
+ %{
+ key: :period,
+ type: :integer,
+ suggestions: [30],
+ description:
+ "A period for which the TOTP code will be valid, in seconds. Defaults to 30 seconds."
+ }
+ ]
+ },
+ %{
+ key: :backup_codes,
+ type: :keyword,
+ description: "MFA backup codes settings",
+ suggestions: [number: 5, length: 16],
+ children: [
+ %{
+ key: :number,
+ type: :integer,
+ suggestions: [5],
+ description: "Number of backup codes to generate."
+ },
+ %{
+ key: :length,
+ type: :integer,
+ suggestions: [16],
+ description:
+ "Determines the length of backup one-time pass-codes, in characters. Defaults to 16 characters."
+ }
+ ]
+ }
+ ]
+ },
+ %{
+ key: :instance_thumbnail,
+ type: {:string, :image},
+ description:
+ "The instance thumbnail can be any image that represents your instance and is used by some apps or services when they display information about your instance.",
+ suggestions: ["/instance/thumbnail.jpeg"]
+ },
+ %{
+ key: :show_reactions,
+ type: :boolean,
+ description: "Let favourites and emoji reactions be viewed through the API."
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: :welcome,
+ type: :group,
+ description: "Welcome messages settings",
+ children: [
+ %{
+ key: :direct_message,
+ type: :keyword,
+ descpiption: "Direct message settings",
+ children: [
+ %{
+ key: :enabled,
+ type: :boolean,
+ description: "Enables sending a direct message to newly registered users"
+ },
+ %{
+ key: :message,
+ type: :string,
+ description: "A message that will be sent to newly registered users",
+ suggestions: [
+ "Hi, @username! Welcome on board!"
+ ]
+ },
+ %{
+ key: :sender_nickname,
+ type: :string,
+ description: "The nickname of the local user that sends a welcome message",
+ suggestions: [
+ "lain"
+ ]
+ }
+ ]
+ },
+ %{
+ key: :chat_message,
+ type: :keyword,
+ descpiption: "Chat message settings",
+ children: [
+ %{
+ key: :enabled,
+ type: :boolean,
+ description: "Enables sending a chat message to newly registered users"
+ },
+ %{
+ key: :message,
+ type: :string,
+ description:
+ "A message that will be sent to newly registered users as a chat message",
+ suggestions: [
+ "Hello, welcome on board!"
+ ]
+ },
+ %{
+ key: :sender_nickname,
+ type: :string,
+ description: "The nickname of the local user that sends a welcome chat message",
+ suggestions: [
+ "lain"
+ ]
+ }
+ ]
+ },
+ %{
+ key: :email,
+ type: :keyword,
+ descpiption: "Email message settings",
+ children: [
+ %{
+ key: :enabled,
+ type: :boolean,
+ description: "Enables sending an email to newly registered users"
+ },
+ %{
+ key: :sender,
+ type: [:string, :tuple],
+ description:
+ "Email address and/or nickname that will be used to send the welcome email.",
+ suggestions: [
+ {"Pleroma App", "welcome@pleroma.app"}
+ ]
+ },
+ %{
+ key: :subject,
+ type: :string,
+ description:
+ "Subject of the welcome email. EEX template with user and instance_name variables can be used.",
+ suggestions: ["Welcome to <%= instance_name%>"]
+ },
+ %{
+ key: :html,
+ type: :string,
+ description:
+ "HTML content of the welcome email. EEX template with user and instance_name variables can be used.",
+ suggestions: ["<h1>Hello <%= user.name%>. Welcome to <%= instance_name%></h1>"]
+ },
+ %{
+ key: :text,
+ type: :string,
+ description:
+ "Text content of the welcome email. EEX template with user and instance_name variables can be used.",
+ suggestions: ["Hello <%= user.name%>. \n Welcome to <%= instance_name%>\n"]
+ }
+ ]
}
]
},
@@ -940,6 +1137,7 @@ config :pleroma, :config_description, [
group: :logger,
type: :group,
key: :ex_syslogger,
+ label: "ExSyslogger",
description: "ExSyslogger-related settings",
children: [
%{
@@ -958,7 +1156,7 @@ config :pleroma, :config_description, [
%{
key: :format,
type: :string,
- description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\".",
+ description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\"",
suggestions: ["$metadata[$level] $message"]
},
%{
@@ -972,6 +1170,7 @@ config :pleroma, :config_description, [
group: :logger,
type: :group,
key: :console,
+ label: "Console Logger",
description: "Console logger settings",
children: [
%{
@@ -983,7 +1182,7 @@ config :pleroma, :config_description, [
%{
key: :format,
type: :string,
- description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\".",
+ description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\"",
suggestions: ["$metadata[$level] $message"]
},
%{
@@ -996,6 +1195,7 @@ config :pleroma, :config_description, [
%{
group: :quack,
type: :group,
+ label: "Quack Logger",
description: "Quack-related settings",
children: [
%{
@@ -1024,6 +1224,7 @@ config :pleroma, :config_description, [
},
%{
key: :webhook_url,
+ label: "Webhook URL",
type: :string,
description: "Configure the Slack incoming webhook",
suggestions: ["https://hooks.slack.com/services/YOUR-KEY-HERE"]
@@ -1046,87 +1247,79 @@ config :pleroma, :config_description, [
description: "Settings for Pleroma FE",
suggestions: [
%{
- theme: "pleroma-dark",
- logo: "/static/logo.png",
- background: "/images/city.jpg",
- redirectRootNoLogin: "/main/all",
- redirectRootLogin: "/main/friends",
- showInstanceSpecificPanel: true,
- scopeOptionsEnabled: false,
- formattingOptionsEnabled: false,
+ alwaysShowSubjectInput: true,
+ background: "/static/aurora_borealis.jpg",
collapseMessageWithSubject: false,
+ disableChat: false,
+ greentext: false,
+ hideFilteredStatuses: false,
+ hideMutedPosts: false,
hidePostStats: false,
+ hideSitename: false,
hideUserStats: false,
+ loginMethod: "password",
+ logo: "/static/logo.png",
+ logoMargin: ".1em",
+ logoMask: true,
+ minimalScopesMode: false,
+ noAttachmentLinks: false,
+ nsfwCensorImage: "/static/img/nsfw.74818f9.png",
+ postContentType: "text/plain",
+ redirectRootLogin: "/main/friends",
+ redirectRootNoLogin: "/main/all",
scopeCopy: true,
+ sidebarRight: false,
+ showFeaturesPanel: true,
+ showInstanceSpecificPanel: false,
subjectLineBehavior: "email",
- alwaysShowSubjectInput: true,
- logoMask: false,
- logoMargin: ".1em",
- stickers: false,
- enableEmojiPicker: false
+ theme: "pleroma-dark",
+ webPushNotifications: false
}
],
children: [
%{
- key: :theme,
- type: :string,
- description: "Which theme to use, they are defined in styles.json",
- suggestions: ["pleroma-dark"]
- },
- %{
- key: :logo,
- type: :string,
- description: "URL of the logo, defaults to Pleroma's logo",
- suggestions: ["/static/logo.png"]
+ key: :alwaysShowSubjectInput,
+ label: "Always show subject input",
+ type: :boolean,
+ description: "When disabled, auto-hide the subject field if it's empty"
},
%{
key: :background,
- type: :string,
+ type: {:string, :image},
description:
"URL of the background, unless viewing a user profile with a background that is set",
suggestions: ["/images/city.jpg"]
},
%{
- key: :redirectRootNoLogin,
- label: "Redirect root no login",
- type: :string,
- description:
- "Relative URL which indicates where to redirect when a user isn't logged in",
- suggestions: ["/main/all"]
- },
- %{
- key: :redirectRootLogin,
- label: "Redirect root login",
- type: :string,
+ key: :collapseMessageWithSubject,
+ label: "Collapse message with subject",
+ type: :boolean,
description:
- "Relative URL which indicates where to redirect when a user is logged in",
- suggestions: ["/main/friends"]
+ "When a message has a subject (aka Content Warning), collapse it by default"
},
%{
- key: :showInstanceSpecificPanel,
- label: "Show instance specific panel",
+ key: :disableChat,
+ label: "PleromaFE Chat",
type: :boolean,
- description: "Whenether to show the instance's specific panel"
+ description: "Disables PleromaFE Chat component"
},
%{
- key: :scopeOptionsEnabled,
- label: "Scope options enabled",
+ key: :greentext,
+ label: "Greentext",
type: :boolean,
- description: "Enable setting a notice visibility and subject/CW when posting"
+ description: "Enables green text on lines prefixed with the > character"
},
%{
- key: :formattingOptionsEnabled,
- label: "Formatting options enabled",
+ key: :hideFilteredStatuses,
+ label: "Hide Filtered Statuses",
type: :boolean,
- description:
- "Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to `:instance`, `allowed_post_formats`"
+ description: "Hides filtered statuses from timelines"
},
%{
- key: :collapseMessageWithSubject,
- label: "Collapse message with subject",
+ key: :hideMutedPosts,
+ label: "Hide Muted Posts",
type: :boolean,
- description:
- "When a message has a subject (aka Content Warning), collapse it by default"
+ description: "Hides muted statuses from timelines"
},
%{
key: :hidePostStats,
@@ -1135,6 +1328,12 @@ config :pleroma, :config_description, [
description: "Hide notices statistics (repeats, favorites, ...)"
},
%{
+ key: :hideSitename,
+ label: "Hide Sitename",
+ type: :boolean,
+ description: "Hides instance name from PleromaFE banner"
+ },
+ %{
key: :hideUserStats,
label: "Hide user stats",
type: :boolean,
@@ -1142,26 +1341,19 @@ config :pleroma, :config_description, [
"Hide profile statistics (posts, posts per day, followers, followings, ...)"
},
%{
- key: :scopeCopy,
- label: "Scope copy",
- type: :boolean,
- description: "Copy the scope (private/unlisted/public) in replies to posts by default"
+ key: :logo,
+ type: {:string, :image},
+ description: "URL of the logo, defaults to Pleroma's logo",
+ suggestions: ["/static/logo.png"]
},
%{
- key: :subjectLineBehavior,
- label: "Subject line behavior",
+ key: :logoMargin,
+ label: "Logo margin",
type: :string,
- description: "Allows changing the default behaviour of subject lines in replies.
- `email`: copy and preprend re:, as in email,
- `masto`: copy verbatim, as in Mastodon,
- `noop`: don't copy the subject.",
- suggestions: ["email", "masto", "noop"]
- },
- %{
- key: :alwaysShowSubjectInput,
- label: "Always show subject input",
- type: :boolean,
- description: "When disabled, auto-hide the subject field if it's empty"
+ description:
+ "Allows you to adjust vertical margins between logo boundary and navbar borders. " <>
+ "The idea is that to have logo's image without any extra margins and instead adjust them to your need in layout.",
+ suggestions: [".1em"]
},
%{
key: :logoMask,
@@ -1172,24 +1364,84 @@ config :pleroma, :config_description, [
"If you want a colorful logo you must disable logoMask."
},
%{
- key: :logoMargin,
- label: "Logo margin",
+ key: :minimalScopesMode,
+ label: "Minimal scopes mode",
+ type: :boolean,
+ description:
+ "Limit scope selection to Direct, User default, and Scope of post replying to. " <>
+ "Also prevents replying to a DM with a public post from PleromaFE."
+ },
+ %{
+ key: :nsfwCensorImage,
+ label: "NSFW Censor Image",
+ type: {:string, :image},
+ description:
+ "URL of the image to use for hiding NSFW media attachments in the timeline",
+ suggestions: ["/static/img/nsfw.74818f9.png"]
+ },
+ %{
+ key: :postContentType,
+ label: "Post Content Type",
+ type: {:dropdown, :atom},
+ description: "Default post formatting option",
+ suggestions: ["text/plain", "text/html", "text/markdown", "text/bbcode"]
+ },
+ %{
+ key: :redirectRootNoLogin,
+ label: "Redirect root no login",
type: :string,
description:
- "Allows you to adjust vertical margins between logo boundary and navbar borders. " <>
- "The idea is that to have logo's image without any extra margins and instead adjust them to your need in layout.",
- suggestions: [".1em"]
+ "Relative URL which indicates where to redirect when a user isn't logged in",
+ suggestions: ["/main/all"]
+ },
+ %{
+ key: :redirectRootLogin,
+ label: "Redirect root login",
+ type: :string,
+ description:
+ "Relative URL which indicates where to redirect when a user is logged in",
+ suggestions: ["/main/friends"]
+ },
+ %{
+ key: :scopeCopy,
+ label: "Scope copy",
+ type: :boolean,
+ description: "Copy the scope (private/unlisted/public) in replies to posts by default"
},
%{
- key: :stickers,
+ key: :sidebarRight,
+ label: "Sidebar on Right",
type: :boolean,
- description: "Enables stickers."
+ description: "Change alignment of sidebar and panels to the right"
},
%{
- key: :enableEmojiPicker,
- label: "Emoji picker",
+ key: :showFeaturesPanel,
+ label: "Show instance features panel",
type: :boolean,
- description: "Enables emoji picker."
+ description:
+ "Enables panel displaying functionality of the instance on the About page"
+ },
+ %{
+ key: :showInstanceSpecificPanel,
+ label: "Show instance specific panel",
+ type: :boolean,
+ description: "Whether to show the instance's custom panel"
+ },
+ %{
+ key: :subjectLineBehavior,
+ label: "Subject line behavior",
+ type: :string,
+ description: "Allows changing the default behaviour of subject lines in replies.
+ `email`: copy and preprend re:, as in email,
+ `masto`: copy verbatim, as in Mastodon,
+ `noop`: don't copy the subject.",
+ suggestions: ["email", "masto", "noop"]
+ },
+ %{
+ key: :theme,
+ type: :string,
+ description: "Which theme to use. Available themes are defined in styles.json",
+ suggestions: ["pleroma-dark"]
}
]
},
@@ -1225,7 +1477,7 @@ config :pleroma, :config_description, [
key: :mascots,
type: {:keyword, :map},
description:
- "Keyword of mascots, each element must contain both an url and a mime_type key",
+ "Keyword of mascots, each element must contain both an URL and a mime_type key",
suggestions: [
pleroma_fox_tan: %{
url: "/images/pleroma-fox-tan-smol.png",
@@ -1245,6 +1497,12 @@ config :pleroma, :config_description, [
suggestions: [
:pleroma_fox_tan
]
+ },
+ %{
+ key: :default_user_avatar,
+ type: {:string, :image},
+ description: "URL of the default user avatar",
+ suggestions: ["/images/avi.png"]
}
]
},
@@ -1253,7 +1511,7 @@ config :pleroma, :config_description, [
key: :manifest,
type: :group,
description:
- "This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE",
+ "This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE.",
children: [
%{
key: :icons,
@@ -1289,10 +1547,46 @@ config :pleroma, :config_description, [
},
%{
group: :pleroma,
+ key: :mrf,
+ tab: :mrf,
+ label: "MRF",
+ type: :group,
+ description: "General MRF settings",
+ children: [
+ %{
+ key: :policies,
+ type: [:module, {:list, :module}],
+ description:
+ "A list of MRF policies enabled. Module names are shortened (removed leading `Pleroma.Web.ActivityPub.MRF.` part), but on adding custom module you need to use full name.",
+ suggestions: {:list_behaviour_implementations, Pleroma.Web.ActivityPub.MRF}
+ },
+ %{
+ key: :transparency,
+ label: "MRF transparency",
+ type: :boolean,
+ description:
+ "Make the content of your Message Rewrite Facility settings public (via nodeinfo)"
+ },
+ %{
+ key: :transparency_exclusions,
+ label: "MRF transparency exclusions",
+ type: {:list, :string},
+ description:
+ "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.",
+ suggestions: [
+ "exclusion.com"
+ ]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
key: :mrf_simple,
- label: "MRF simple",
+ tab: :mrf,
+ related_policy: "Pleroma.Web.ActivityPub.MRF.SimplePolicy",
+ label: "MRF Simple",
type: :group,
- description: "Message Rewrite Facility",
+ description: "Simple ingress policies",
children: [
%{
key: :media_removal,
@@ -1311,19 +1605,25 @@ config :pleroma, :config_description, [
key: :federated_timeline_removal,
type: {:list, :string},
description:
- "List of instances to remove from Federated (aka The Whole Known Network) Timeline",
+ "List of instances to remove from the Federated (aka The Whole Known Network) Timeline",
suggestions: ["example.com", "*.example.com"]
},
%{
key: :reject,
type: {:list, :string},
- description: "List of instances to reject any activities from",
+ description: "List of instances to reject activities from (except deletes)",
suggestions: ["example.com", "*.example.com"]
},
%{
key: :accept,
type: {:list, :string},
- description: "List of instances to accept any activities from",
+ description: "List of instances to only accept activities from (except deletes)",
+ suggestions: ["example.com", "*.example.com"]
+ },
+ %{
+ key: :followers_only,
+ type: {:list, :string},
+ description: "Force posts from the given instances to be visible by followers only",
suggestions: ["example.com", "*.example.com"]
},
%{
@@ -1343,13 +1643,38 @@ config :pleroma, :config_description, [
type: {:list, :string},
description: "List of instances to strip banners from",
suggestions: ["example.com", "*.example.com"]
+ },
+ %{
+ key: :reject_deletes,
+ type: {:list, :string},
+ description: "List of instances to reject deletions from",
+ suggestions: ["example.com", "*.example.com"]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: :mrf_activity_expiration,
+ tab: :mrf,
+ related_policy: "Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy",
+ label: "MRF Activity Expiration Policy",
+ type: :group,
+ description: "Adds automatic expiration to all local activities",
+ children: [
+ %{
+ key: :days,
+ type: :integer,
+ description: "Default global expiration time for all local activities (in days)",
+ suggestions: [90, 365]
}
]
},
%{
group: :pleroma,
key: :mrf_subchain,
- label: "MRF subchain",
+ tab: :mrf,
+ related_policy: "Pleroma.Web.ActivityPub.MRF.SubchainPolicy",
+ label: "MRF Subchain",
type: :group,
description:
"This policy processes messages through an alternate pipeline when a given message matches certain criteria." <>
@@ -1357,7 +1682,7 @@ config :pleroma, :config_description, [
children: [
%{
key: :match_actor,
- type: :map,
+ type: {:map, {:list, :string}},
description: "Matches a series of regular expressions against the actor field",
suggestions: [
%{
@@ -1370,9 +1695,10 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :mrf_rejectnonpublic,
- description:
- "MRF RejectNonPublic settings. RejectNonPublic drops posts with non-public visibility settings.",
- label: "MRF reject non public",
+ tab: :mrf,
+ related_policy: "Pleroma.Web.ActivityPub.MRF.RejectNonPublic",
+ description: "RejectNonPublic drops posts with non-public visibility settings.",
+ label: "MRF Reject Non Public",
type: :group,
children: [
%{
@@ -1391,16 +1717,18 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :mrf_hellthread,
- label: "MRF hellthread",
+ tab: :mrf,
+ related_policy: "Pleroma.Web.ActivityPub.MRF.HellthreadPolicy",
+ label: "MRF Hellthread",
type: :group,
- description: "Block messages with too much mentions",
+ description: "Block messages with excessive user mentions",
children: [
%{
key: :delist_threshold,
type: :integer,
description:
- "Number of mentioned users after which the message gets delisted (the message can still be seen, " <>
- " but it will not show up in public timelines and mentioned users won't get notifications about it). Set to 0 to disable.",
+ "Number of mentioned users after which the message gets removed from timelines and" <>
+ "disables notifications. Set to 0 to disable.",
suggestions: [10]
},
%{
@@ -1415,27 +1743,29 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :mrf_keyword,
- label: "MRF keyword",
+ tab: :mrf,
+ related_policy: "Pleroma.Web.ActivityPub.MRF.KeywordPolicy",
+ label: "MRF Keyword",
type: :group,
description: "Reject or Word-Replace messages with a keyword or regex",
children: [
%{
key: :reject,
- type: [:string, :regex],
+ type: {:list, :string},
description:
"A list of patterns which result in message being rejected. Each pattern can be a string or a regular expression.",
suggestions: ["foo", ~r/foo/iu]
},
%{
key: :federated_timeline_removal,
- type: [:string, :regex],
+ type: {:list, :string},
description:
"A list of patterns which result in message being removed from federated timelines (a.k.a unlisted). Each pattern can be a string or a regular expression.",
suggestions: ["foo", ~r/foo/iu]
},
%{
key: :replace,
- type: [{:tuple, :string, :string}, {:tuple, :regex, :string}],
+ type: {:list, :tuple},
description:
"A list of tuples containing {pattern, replacement}. Each pattern can be a string or a regular expression.",
suggestions: [{"foo", "bar"}, {~r/foo/iu, "bar"}]
@@ -1445,14 +1775,16 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :mrf_mention,
- label: "MRF mention",
+ tab: :mrf,
+ related_policy: "Pleroma.Web.ActivityPub.MRF.MentionPolicy",
+ label: "MRF Mention",
type: :group,
- description: "Block messages which mention a user",
+ description: "Block messages which mention a specific user",
children: [
%{
key: :actors,
type: {:list, :string},
- description: "A list of actors for which any post mentioning them will be dropped.",
+ description: "A list of actors for which any post mentioning them will be dropped",
suggestions: ["actor1", "actor2"]
}
]
@@ -1460,7 +1792,9 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :mrf_vocabulary,
- label: "MRF vocabulary",
+ tab: :mrf,
+ related_policy: "Pleroma.Web.ActivityPub.MRF.VocabularyPolicy",
+ label: "MRF Vocabulary",
type: :group,
description: "Filter messages which belong to certain activity vocabularies",
children: [
@@ -1468,14 +1802,14 @@ config :pleroma, :config_description, [
key: :accept,
type: {:list, :string},
description:
- "A list of ActivityStreams terms to accept. If empty, all supported messages are accepted",
+ "A list of ActivityStreams terms to accept. If empty, all supported messages are accepted.",
suggestions: ["Create", "Follow", "Mention", "Announce", "Like"]
},
%{
key: :reject,
type: {:list, :string},
description:
- "A list of ActivityStreams terms to reject. If empty, no messages are rejected",
+ "A list of ActivityStreams terms to reject. If empty, no messages are rejected.",
suggestions: ["Create", "Follow", "Mention", "Announce", "Like"]
}
]
@@ -1483,6 +1817,8 @@ config :pleroma, :config_description, [
# %{
# group: :pleroma,
# key: :mrf_user_allowlist,
+ # tab: :mrf,
+ # related_policy: "Pleroma.Web.ActivityPub.MRF.UserAllowListPolicy",
# type: :map,
# description:
# "The keys in this section are the domain names that the policy should apply to." <>
@@ -1505,13 +1841,40 @@ config :pleroma, :config_description, [
},
%{
key: :base_url,
+ label: "Base URL",
type: :string,
description:
"The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts.",
suggestions: ["https://example.com"]
},
%{
+ key: :invalidation,
+ type: :keyword,
+ descpiption: "",
+ suggestions: [
+ enabled: true,
+ provider: Pleroma.Web.MediaProxy.Invalidation.Script
+ ],
+ children: [
+ %{
+ key: :enabled,
+ type: :boolean,
+ description: "Enables media cache object invalidation."
+ },
+ %{
+ key: :provider,
+ type: :module,
+ description: "Module which will be used to purge objects from the cache.",
+ suggestions: [
+ Pleroma.Web.MediaProxy.Invalidation.Script,
+ Pleroma.Web.MediaProxy.Invalidation.Http
+ ]
+ }
+ ]
+ },
+ %{
key: :proxy_opts,
+ label: "Proxy Options",
type: :keyword,
description: "Options for Pleroma.ReverseProxy",
suggestions: [
@@ -1539,6 +1902,7 @@ config :pleroma, :config_description, [
},
%{
key: :http,
+ label: "HTTP",
type: :keyword,
description: "HTTP options",
children: [
@@ -1577,8 +1941,52 @@ config :pleroma, :config_description, [
%{
key: :whitelist,
type: {:list, :string},
- description: "List of domains to bypass the mediaproxy",
- suggestions: ["example.com"]
+ description: "List of hosts with scheme to bypass the mediaproxy",
+ suggestions: ["http://example.com"]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: Pleroma.Web.MediaProxy.Invalidation.Http,
+ type: :group,
+ description: "HTTP invalidate settings",
+ children: [
+ %{
+ key: :method,
+ type: :atom,
+ description: "HTTP method of request. Default: :purge"
+ },
+ %{
+ key: :headers,
+ type: {:keyword, :string},
+ description: "HTTP headers of request",
+ suggestions: [{"x-refresh", 1}]
+ },
+ %{
+ key: :options,
+ type: :keyword,
+ description: "Request options",
+ children: [
+ %{
+ key: :params,
+ type: {:map, :string}
+ }
+ ]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: Pleroma.Web.MediaProxy.Invalidation.Script,
+ type: :group,
+ description: "Script invalidate settings",
+ children: [
+ %{
+ key: :script_path,
+ type: :string,
+ description: "Path to shell script. Which will run purge cache.",
+ suggestions: ["./installation/nginx-cache-purge.sh.example"]
}
]
},
@@ -1595,6 +2003,7 @@ config :pleroma, :config_description, [
},
%{
key: :ip,
+ label: "IP",
type: :tuple,
description: "IP address to bind to",
suggestions: [{0, 0, 0, 0}]
@@ -1608,7 +2017,7 @@ config :pleroma, :config_description, [
%{
key: :dstport,
type: :integer,
- description: "Port advertised in urls (optional, defaults to port)",
+ description: "Port advertised in URLs (optional, defaults to port)",
suggestions: [9999]
}
]
@@ -1616,6 +2025,7 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :activitypub,
+ label: "ActivityPub",
type: :group,
description: "ActivityPub-related settings",
children: [
@@ -1638,7 +2048,7 @@ config :pleroma, :config_description, [
key: :note_replies_output_limit,
type: :integer,
description:
- "The number of Note replies' URIs to be included with outgoing federation (`5` to match Mastodon hardcoded value, `0` to disable the output)."
+ "The number of Note replies' URIs to be included with outgoing federation (`5` to match Mastodon hardcoded value, `0` to disable the output)"
},
%{
key: :follow_handshake_timeout,
@@ -1651,6 +2061,7 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :http_security,
+ label: "HTTP security",
type: :group,
description: "HTTP security settings",
children: [
@@ -1689,7 +2100,7 @@ config :pleroma, :config_description, [
key: :report_uri,
label: "Report URI",
type: :string,
- description: "Adds the specified url to report-uri and report-to group in CSP header",
+ description: "Adds the specified URL to report-uri and report-to group in CSP header",
suggestions: ["https://example.com/report-uri"]
}
]
@@ -1697,9 +2108,10 @@ config :pleroma, :config_description, [
%{
group: :web_push_encryption,
key: :vapid_details,
+ label: "Vapid Details",
type: :group,
description:
- "Web Push Notifications configuration. You can use the mix task mix web_push.gen.keypair to generate it",
+ "Web Push Notifications configuration. You can use the mix task mix web_push.gen.keypair to generate it.",
children: [
%{
key: :subject,
@@ -1766,34 +2178,18 @@ config :pleroma, :config_description, [
},
%{
group: :pleroma,
+ label: "Pleroma Admin Token",
type: :group,
description:
- "Allows to set a token that can be used to authenticate with the admin api without using an actual user by giving it as the `admin_token` parameter",
+ "Allows setting a token that can be used to authenticate requests with admin privileges without a normal user account token. Append the `admin_token` parameter to requests to utilize it. (Please reconsider using HTTP Basic Auth or OAuth-based authentication if possible)",
children: [
%{
key: :admin_token,
type: :string,
- description: "Token",
- suggestions: ["We recommend a secure random string or UUID"]
- }
- ]
- },
- %{
- group: :pleroma_job_queue,
- key: :queues,
- type: :group,
- description: "[Deprecated] Replaced with `Oban`/`:queues` (keeping the same format)"
- },
- %{
- group: :pleroma,
- key: Pleroma.Web.Federator.RetryQueue,
- type: :group,
- description: "[Deprecated] See `Oban` and `:workers` sections for configuration notes",
- children: [
- %{
- key: :max_retries,
- type: :integer,
- description: "[Deprecated] Replaced as `Oban`/`:queues`/`:outgoing_federation` value"
+ description: "Admin token",
+ suggestions: [
+ "Please use a high entropy string or UUID"
+ ]
}
]
},
@@ -1811,25 +2207,12 @@ config :pleroma, :config_description, [
""",
children: [
%{
- key: :repo,
- type: :module,
- description: "Application's Ecto repo",
- suggestions: [Pleroma.Repo]
- },
- %{
- key: :verbose,
+ key: :log,
type: {:dropdown, :atom},
description: "Logs verbose mode",
suggestions: [false, :error, :warn, :info, :debug]
},
%{
- key: :prune,
- type: [:atom, :tuple],
- description:
- "Non-retryable jobs [pruning settings](https://github.com/sorentwo/oban#pruning)",
- suggestions: [:disabled, {:maxlen, 1500}, {:maxage, 60 * 60}]
- },
- %{
key: :queues,
type: {:keyword, :integer},
description:
@@ -1963,34 +2346,33 @@ config :pleroma, :config_description, [
key: :rich_media,
type: :group,
description:
- "If enabled the instance will parse metadata from attached links to generate link previews.",
+ "If enabled the instance will parse metadata from attached links to generate link previews",
children: [
%{
key: :enabled,
type: :boolean,
- description: "Enables RichMedia parsing of URLs."
+ description: "Enables RichMedia parsing of URLs"
},
%{
key: :ignore_hosts,
type: {:list, :string},
- description: "List of hosts which will be ignored by the metadata parser.",
+ description: "List of hosts which will be ignored by the metadata parser",
suggestions: ["accounts.google.com", "xss.website"]
},
%{
key: :ignore_tld,
label: "Ignore TLD",
type: {:list, :string},
- description: "List TLDs (top-level domains) which will ignore for parse metadata.",
+ description: "List TLDs (top-level domains) which will ignore for parse metadata",
suggestions: ["local", "localdomain", "lan"]
},
%{
key: :parsers,
type: {:list, :module},
- description: "List of Rich Media parsers.",
+ description:
+ "List of Rich Media parsers. Module names are shortened (removed leading `Pleroma.Web.RichMedia.Parsers.` part), but on adding custom module you need to use full name.",
suggestions: [
- Pleroma.Web.RichMedia.Parsers.MetaTagsParser,
Pleroma.Web.RichMedia.Parsers.OEmbed,
- Pleroma.Web.RichMedia.Parsers.OGP,
Pleroma.Web.RichMedia.Parsers.TwitterCard
]
},
@@ -1998,7 +2380,8 @@ config :pleroma, :config_description, [
key: :ttl_setters,
label: "TTL setters",
type: {:list, :module},
- description: "List of rich media TTL setters.",
+ description:
+ "List of rich media TTL setters. Module names are shortened (removed leading `Pleroma.Web.RichMedia.Parser.` part), but on adding custom module you need to use full name.",
suggestions: [
Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl
]
@@ -2006,44 +2389,53 @@ config :pleroma, :config_description, [
]
},
%{
- group: :auto_linker,
- key: :opts,
+ group: :pleroma,
+ key: Pleroma.Formatter,
+ label: "Auto Linker",
type: :group,
- description: "Configuration for the auto_linker library",
+ description:
+ "Configuration for Pleroma's link formatter which parses mentions, hashtags, and URLs.",
children: [
%{
key: :class,
- type: [:string, false],
- description: "Specify the class to be added to the generated link. Disable to clear",
+ type: [:string, :boolean],
+ description: "Specify the class to be added to the generated link. Disable to clear.",
suggestions: ["auto-linker", false]
},
%{
key: :rel,
- type: [:string, false],
- description: "Override the rel attribute. Disable to clear",
+ type: [:string, :boolean],
+ description: "Override the rel attribute. Disable to clear.",
suggestions: ["ugc", "noopener noreferrer", false]
},
%{
key: :new_window,
type: :boolean,
- description: "Link urls will open in new window/tab"
+ description: "Link URLs will open in a new window/tab."
},
%{
key: :truncate,
- type: [:integer, false],
+ type: [:integer, :boolean],
description:
- "Set to a number to truncate urls longer then the number. Truncated urls will end in `..`",
+ "Set to a number to truncate URLs longer than the number. Truncated URLs will end in `...`",
suggestions: [15, false]
},
%{
key: :strip_prefix,
type: :boolean,
- description: "Strip the scheme prefix"
+ description: "Strip the scheme prefix."
},
%{
key: :extra,
type: :boolean,
- description: "Link urls with rarely used schemes (magnet, ipfs, irc, etc.)"
+ description: "Link URLs with rarely used schemes (magnet, ipfs, irc, etc.)"
+ },
+ %{
+ key: :validate_tld,
+ type: [:atom, :boolean],
+ description:
+ "Set to false to disable TLD validation for URLs/emails. Can be set to :no_scheme to validate TLDs only for URLs without a scheme (e.g `example.com` will be validated, but `http://example.loki` won't)",
+ suggestions: [:no_scheme, true]
}
]
},
@@ -2089,6 +2481,7 @@ config :pleroma, :config_description, [
},
%{
group: :pleroma,
+ label: "Pleroma Authenticator",
type: :group,
description: "Authenticator",
children: [
@@ -2102,6 +2495,7 @@ 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" <>
@@ -2188,6 +2582,7 @@ config :pleroma, :config_description, [
},
%{
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\"",
@@ -2203,11 +2598,12 @@ config :pleroma, :config_description, [
children: [
%{
key: :enforce_oauth_admin_scope_usage,
+ label: "Enforce OAuth admin scope usage",
type: :boolean,
description:
"OAuth admin scope requirement toggle. " <>
"If enabled, admin actions explicitly demand admin OAuth scope(s) presence in OAuth token " <>
- "(client app must support admin scopes). If disabled and token doesn't have admin scope(s)," <>
+ "(client app must support admin scopes). If disabled and token doesn't have admin scope(s), " <>
"`is_admin` user flag grants access to admin-specific actions."
},
%{
@@ -2219,6 +2615,7 @@ config :pleroma, :config_description, [
},
%{
key: :oauth_consumer_template,
+ label: "OAuth consumer template",
type: :string,
description:
"OAuth consumer mode authentication form template. By default it's `consumer.html` which corresponds to" <>
@@ -2227,6 +2624,7 @@ config :pleroma, :config_description, [
},
%{
key: :oauth_consumer_strategies,
+ label: "OAuth consumer strategies",
type: {:list, :string},
description:
"The list of enabled OAuth consumer strategies. By default it's set by OAUTH_CONSUMER_STRATEGIES environment variable." <>
@@ -2293,14 +2691,14 @@ config :pleroma, :config_description, [
children: [
%{
key: :logo,
- type: :string,
+ type: {:string, :image},
description: "A path to a custom logo. Set it to `nil` to use the default Pleroma logo.",
suggestions: ["some/path/logo.png"]
},
%{
key: :styling,
type: :map,
- description: "a map with color settings for email templates.",
+ description: "A map with color settings for email templates.",
suggestions: [
%{
link_color: "#d8a070",
@@ -2355,14 +2753,14 @@ config :pleroma, :config_description, [
%{
key: :enabled,
type: :boolean,
- description: "enables new users admin digest email when `true`",
- suggestions: [false]
+ description: "Enables new users admin digest email when `true`"
}
]
},
%{
group: :pleroma,
key: :oauth2,
+ label: "OAuth2",
type: :group,
description: "Configure OAuth 2 provider capabilities",
children: [
@@ -2381,7 +2779,7 @@ config :pleroma, :config_description, [
%{
key: :clean_expired_tokens,
type: :boolean,
- description: "Enable a background job to clean expired oauth tokens. Default: disabled."
+ description: "Enable a background job to clean expired OAuth tokens. Default: disabled."
}
]
},
@@ -2405,7 +2803,7 @@ config :pleroma, :config_description, [
},
%{
key: :groups,
- type: {:keyword, :string, {:list, :string}},
+ type: {:keyword, {:list, :string}},
description:
"Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the group name" <>
" and the value is the location or array of locations. * can be used as a wildcard.",
@@ -2465,6 +2863,7 @@ config :pleroma, :config_description, [
},
%{
key: :relation_id_action,
+ label: "Relation ID action",
type: [:tuple, {:list, :tuple}],
description: "For actions on relation with a specific user (follow, unfollow)",
suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
@@ -2478,6 +2877,7 @@ config :pleroma, :config_description, [
},
%{
key: :status_id_action,
+ label: "Status ID action",
type: [:tuple, {:list, :tuple}],
description:
"For fav / unfav or reblog / unreblog actions on the same status by the same user",
@@ -2493,6 +2893,7 @@ 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 " <>
@@ -2531,8 +2932,9 @@ config :pleroma, :config_description, [
},
%{
group: :mime,
+ label: "Mime Types",
type: :group,
- description: "Mime types",
+ description: "Mime Types settings",
children: [
%{
key: :types,
@@ -2577,19 +2979,6 @@ config :pleroma, :config_description, [
]
},
%{
- group: :tesla,
- type: :group,
- description: "Tesla settings",
- children: [
- %{
- key: :adapter,
- type: :module,
- description: "Tesla adapter",
- suggestions: [Tesla.Adapter.Hackney]
- }
- ]
- },
- %{
group: :pleroma,
key: :chat,
type: :group,
@@ -2602,20 +2991,9 @@ config :pleroma, :config_description, [
]
},
%{
- group: :http_signatures,
- type: :group,
- description: "HTTP Signatures settings",
- children: [
- %{
- key: :adapter,
- type: :module,
- suggestions: [Pleroma.Signature]
- }
- ]
- },
- %{
group: :pleroma,
key: :http,
+ label: "HTTP",
type: :group,
description: "HTTP settings",
children: [
@@ -2664,6 +3042,7 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :markup,
+ label: "Markup Settings",
type: :group,
children: [
%{
@@ -2685,6 +3064,8 @@ config :pleroma, :config_description, [
%{
key: :scrub_policy,
type: {:list, :module},
+ description:
+ "Module names are shortened (removed leading `Pleroma.HTML.` part), but on adding custom module you need to use full name.",
suggestions: [Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]
}
]
@@ -2703,7 +3084,9 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :mrf_normalize_markup,
- label: "MRF normalize markup",
+ tab: :mrf,
+ related_policy: "Pleroma.Web.ActivityPub.MRF.NormalizeMarkup",
+ label: "MRF Normalize Markup",
description: "MRF NormalizeMarkup settings. Scrub configured hypertext markup.",
type: :group,
children: [
@@ -2722,6 +3105,7 @@ config :pleroma, :config_description, [
%{
key: :restricted_nicknames,
type: {:list, :string},
+ description: "List of nicknames users may not register with.",
suggestions: [
".well-known",
"~",
@@ -2754,11 +3138,18 @@ config :pleroma, :config_description, [
"users",
"web"
]
+ },
+ %{
+ key: :email_blacklist,
+ type: {:list, :string},
+ description: "List of email domains users may not register with.",
+ suggestions: ["mailinator.com", "maildrop.cc"]
}
]
},
%{
group: :cors_plug,
+ label: "CORS plug config",
type: :group,
children: [
%{
@@ -2831,6 +3222,7 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :web_cache_ttl,
+ label: "Web cache TTL",
type: :group,
description:
"The expiration time for the web responses cache. Values should be in milliseconds or `nil` to disable expiration.",
@@ -2853,9 +3245,10 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :static_fe,
+ label: "Static FE",
type: :group,
description:
- "Render profiles and posts using server-generated HTML that is viewable without using JavaScript.",
+ "Render profiles and posts using server-generated HTML that is viewable without using JavaScript",
children: [
%{
key: :enabled,
@@ -2873,18 +3266,18 @@ config :pleroma, :config_description, [
%{
key: :post_title,
type: :map,
- description: "Configure title rendering.",
+ description: "Configure title rendering",
children: [
%{
key: :max_length,
type: :integer,
- description: "Maximum number of characters before truncating title.",
+ description: "Maximum number of characters before truncating title",
suggestions: [100]
},
%{
key: :omission,
type: :string,
- description: "Replacement which will be used after truncating string.",
+ description: "Replacement which will be used after truncating string",
suggestions: ["..."]
}
]
@@ -2894,8 +3287,12 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :mrf_object_age,
+ tab: :mrf,
+ related_policy: "Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy",
+ label: "MRF Object Age",
type: :group,
- description: "Rejects or delists posts based on their age when received.",
+ description:
+ "Rejects or delists posts based on their timestamp deviance from your server's clock.",
children: [
%{
key: :threshold,
@@ -2908,7 +3305,7 @@ config :pleroma, :config_description, [
type: {:list, :atom},
description:
"A list of actions to apply to the post. `:delist` removes the post from public timelines; " <>
- "`:strip_followers` removes followers from the ActivityPub recipient list, ensuring they won't be delivered to home timelines; " <>
+ "`:strip_followers` removes followers from the ActivityPub recipient list ensuring they won't be delivered to home timelines; " <>
"`:reject` rejects the message entirely",
suggestions: [:delist, :strip_followers, :reject]
}
@@ -2936,15 +3333,311 @@ config :pleroma, :config_description, [
%{
key: :workers,
type: :integer,
- description: "Number of workers to send notifications.",
+ description: "Number of workers to send notifications",
suggestions: [3]
},
%{
key: :overflow_workers,
type: :integer,
- description: "Maximum number of workers created if pool is empty.",
+ description: "Maximum number of workers created if pool is empty",
suggestions: [2]
}
]
+ },
+ %{
+ 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: :await_up_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]
+ }
+ ]
+ }
+ 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,
+ label: "Restrict Unauthenticated",
+ type: :group,
+ description:
+ "Disallow viewing timelines, user profiles and statuses for unauthenticated users.",
+ children: [
+ %{
+ key: :timelines,
+ type: :map,
+ description: "Settings for public and federated timelines.",
+ children: [
+ %{
+ key: :local,
+ type: :boolean,
+ description: "Disallow view public timeline."
+ },
+ %{
+ key: :federated,
+ type: :boolean,
+ description: "Disallow view federated timeline."
+ }
+ ]
+ },
+ %{
+ key: :profiles,
+ type: :map,
+ description: "Settings for user profiles.",
+ children: [
+ %{
+ key: :local,
+ type: :boolean,
+ description: "Disallow view local user profiles."
+ },
+ %{
+ key: :remote,
+ type: :boolean,
+ description: "Disallow view remote user profiles."
+ }
+ ]
+ },
+ %{
+ key: :activities,
+ type: :map,
+ description: "Settings for statuses.",
+ children: [
+ %{
+ key: :local,
+ type: :boolean,
+ description: "Disallow view local statuses."
+ },
+ %{
+ key: :remote,
+ type: :boolean,
+ description: "Disallow view remote statuses."
+ }
+ ]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: Pleroma.Web.ApiSpec.CastAndValidate,
+ type: :group,
+ children: [
+ %{
+ key: :strict,
+ type: :boolean,
+ description:
+ "Enables strict input validation (useful in development, not recommended in production)"
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: :instances_favicons,
+ type: :group,
+ description: "Control favicons for instances",
+ children: [
+ %{
+ key: :enabled,
+ type: :boolean,
+ description: "Allow/disallow displaying and getting instances favicons"
+ }
+ ]
+ },
+ %{
+ group: :ex_aws,
+ key: :s3,
+ type: :group,
+ descriptions: "S3 service related settings",
+ children: [
+ %{
+ key: :access_key_id,
+ type: :string,
+ description: "S3 access key ID",
+ suggestions: ["AKIAQ8UKHTGIYN7DMWWJ"]
+ },
+ %{
+ key: :secret_access_key,
+ type: :string,
+ description: "Secret access key",
+ suggestions: ["JFGt+fgH1UQ7vLUQjpW+WvjTdV/UNzVxcwn7DkaeFKtBS5LvoXvIiME4NQBsT6ZZ"]
+ },
+ %{
+ key: :host,
+ type: :string,
+ description: "S3 host",
+ suggestions: ["s3.eu-central-1.amazonaws.com"]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: :frontends,
+ type: :group,
+ description: "Installed frontends management",
+ children: [
+ %{
+ key: :primary,
+ type: :map,
+ description: "Primary frontend, the one that is served for all pages by default",
+ children: installed_frontend_options
+ },
+ %{
+ key: :admin,
+ type: :map,
+ description: "Admin frontend",
+ children: installed_frontend_options
+ },
+ %{
+ key: :available,
+ type: :map,
+ description:
+ "A map containing available frontends and parameters for their installation.",
+ children: [
+ frontend_options
+ ]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: Pleroma.Web.Preload,
+ type: :group,
+ description: "Preload-related settings",
+ children: [
+ %{
+ key: :providers,
+ type: {:list, :module},
+ description: "List of preload providers to enable",
+ suggestions: [
+ Pleroma.Web.Preload.Providers.Instance,
+ Pleroma.Web.Preload.Providers.User,
+ Pleroma.Web.Preload.Providers.Timelines,
+ Pleroma.Web.Preload.Providers.StatusNet
+ ]
+ }
+ ]
}
]
diff --git a/config/dev.exs b/config/dev.exs
index 7e1e3b4be..4faaeff5b 100644
--- a/config/dev.exs
+++ b/config/dev.exs
@@ -52,6 +52,8 @@ config :pleroma, Pleroma.Repo,
hostname: "localhost",
pool_size: 10
+config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: true
+
if File.exists?("./config/dev.secret.exs") do
import_config "dev.secret.exs"
else
diff --git a/config/test.exs b/config/test.exs
index b8ea63c94..f0358e384 100644
--- a/config/test.exs
+++ b/config/test.exs
@@ -21,7 +21,10 @@ config :logger, :console,
config :pleroma, :auth, oauth_consumer_strategies: []
-config :pleroma, Pleroma.Upload, filters: [], link_name: false
+config :pleroma, Pleroma.Upload,
+ filters: [],
+ link_name: false,
+ default_description: :filename
config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads"
@@ -56,6 +59,19 @@ config :pleroma, :rich_media,
ignore_hosts: [],
ignore_tld: ["local", "localdomain", "lan"]
+config :pleroma, :instance,
+ multi_factor_authentication: [
+ totp: [
+ # digits 6 or 8
+ digits: 6,
+ period: 30
+ ],
+ backup_codes: [
+ number: 2,
+ length: 6
+ ]
+ ]
+
config :web_push_encryption, :vapid_details,
subject: "mailto:administrator@example.com",
public_key:
@@ -66,8 +82,8 @@ config :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock
config :pleroma, Oban,
queues: false,
- prune: :disabled,
- crontab: false
+ crontab: false,
+ plugins: false
config :pleroma, Pleroma.ScheduledActivity,
daily_user_limit: 2,
@@ -90,10 +106,25 @@ config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock
config :pleroma, :modules, runtime_dir: "test/fixtures/modules"
+config :pleroma, Pleroma.Gun, Pleroma.GunMock
+
config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: true
config :pleroma, Pleroma.Plugs.RemoteIp, enabled: false
+config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: true
+
+config :pleroma, :instances_favicons, enabled: true
+
+config :pleroma, Pleroma.Uploaders.S3,
+ bucket: nil,
+ streaming_enabled: true,
+ public_endpoint: nil
+
+config :tzdata, :autoupdate, :disabled
+
+config :pleroma, :mrf, policies: []
+
if File.exists?("./config/test.secret.exs") do
import_config "test.secret.exs"
else