allow disabling prometheus entirely
[akkoma] / config / description.exs
1 import Config
2
3 websocket_config = [
4 path: "/websocket",
5 serializer: [
6 {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
7 {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
8 ],
9 timeout: 60_000,
10 transport_log: false,
11 compress: false
12 ]
13
14 installed_frontend_options = [
15 %{
16 key: "name",
17 label: "Name",
18 type: :string,
19 description:
20 "Name of the installed frontend. Valid config must include both `Name` and `Reference` values."
21 },
22 %{
23 key: "ref",
24 label: "Reference",
25 type: :string,
26 description:
27 "Reference of the installed frontend to be used. Valid config must include both `Name` and `Reference` values."
28 }
29 ]
30
31 frontend_options = [
32 %{
33 key: "name",
34 label: "Name",
35 type: :string,
36 description: "Name of the frontend."
37 },
38 %{
39 key: "ref",
40 label: "Reference",
41 type: :string,
42 description: "Reference of the frontend to be used."
43 },
44 %{
45 key: "git",
46 label: "Git Repository URL",
47 type: :string,
48 description: "URL of the git repository of the frontend"
49 },
50 %{
51 key: "build_url",
52 label: "Build URL",
53 type: :string,
54 description:
55 "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`.",
56 example: "https://some.url/builds/${ref}.zip"
57 },
58 %{
59 key: "build_dir",
60 label: "Build directory",
61 type: :string,
62 description: "The directory inside the zip file "
63 },
64 %{
65 key: "custom-http-headers",
66 label: "Custom HTTP headers",
67 type: {:list, :string},
68 description: "The custom HTTP headers for the frontend"
69 }
70 ]
71
72 config :pleroma, :config_description, [
73 %{
74 group: :pleroma,
75 key: Pleroma.Upload,
76 type: :group,
77 description: "Upload general settings",
78 children: [
79 %{
80 key: :uploader,
81 type: :module,
82 description: "Module which will be used for uploads",
83 suggestions: {:list_behaviour_implementations, Pleroma.Uploaders.Uploader}
84 },
85 %{
86 key: :filters,
87 type: {:list, :module},
88 description:
89 "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.",
90 suggestions: {:list_behaviour_implementations, Pleroma.Upload.Filter}
91 },
92 %{
93 key: :link_name,
94 type: :boolean,
95 description:
96 "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`."
97 },
98 %{
99 key: :base_url,
100 label: "Base URL",
101 type: :string,
102 description:
103 "Base URL for the uploads. Required if you use a CDN or host attachments under a different domain.",
104 suggestions: [
105 "https://cdn-host.com"
106 ]
107 },
108 %{
109 key: :proxy_remote,
110 type: :boolean,
111 description: """
112 Proxy requests to the remote uploader.\n
113 Useful if media upload endpoint is not internet accessible.
114 """
115 },
116 %{
117 key: :filename_display_max_length,
118 type: :integer,
119 description: "Set max length of a filename to display. 0 = no limit. Default: 30"
120 }
121 ]
122 },
123 %{
124 group: :pleroma,
125 key: Pleroma.Uploaders.Local,
126 type: :group,
127 description: "Local uploader-related settings",
128 children: [
129 %{
130 key: :uploads,
131 type: :string,
132 description: "Path where user's uploads will be saved",
133 suggestions: [
134 "uploads"
135 ]
136 }
137 ]
138 },
139 %{
140 group: :pleroma,
141 key: Pleroma.Uploaders.S3,
142 type: :group,
143 description: "S3 uploader-related settings",
144 children: [
145 %{
146 key: :bucket,
147 type: :string,
148 description: "S3 bucket",
149 suggestions: [
150 "bucket"
151 ]
152 },
153 %{
154 key: :bucket_namespace,
155 type: :string,
156 description: "S3 bucket namespace",
157 suggestions: ["pleroma"]
158 },
159 %{
160 key: :truncated_namespace,
161 type: :string,
162 description:
163 "If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <>
164 " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in Upload base_url."
165 },
166 %{
167 key: :streaming_enabled,
168 type: :boolean,
169 description:
170 "Enable streaming uploads, when enabled the file will be sent to the server in chunks as it's being read. This may be unsupported by some providers, try disabling this if you have upload problems."
171 }
172 ]
173 },
174 %{
175 group: :pleroma,
176 key: Pleroma.Upload.Filter.Mogrify,
177 type: :group,
178 description: "Uploads mogrify filter settings",
179 children: [
180 %{
181 key: :args,
182 type: [:string, {:list, :string}, {:list, :tuple}],
183 description:
184 "List of actions for the mogrify command. It's possible to add self-written settings as string. " <>
185 "For example `auto-orient, strip, {\"resize\", \"3840x1080>\"}` value will be parsed into valid list of the settings.",
186 suggestions: [
187 "strip",
188 "auto-orient",
189 {"implode", "1"}
190 ]
191 }
192 ]
193 },
194 %{
195 group: :pleroma,
196 key: Pleroma.Upload.Filter.AnonymizeFilename,
197 type: :group,
198 description: "Filter replaces the filename of the upload",
199 children: [
200 %{
201 key: :text,
202 type: :string,
203 description:
204 "Text to replace filenames in links. If no setting, {random}.extension will be used. You can get the original" <>
205 " filename extension by using {extension}, for example custom-file-name.{extension}.",
206 suggestions: [
207 "custom-file-name.{extension}"
208 ]
209 }
210 ]
211 },
212 %{
213 group: :pleroma,
214 key: Pleroma.Emails.Mailer,
215 type: :group,
216 description: "Mailer-related settings",
217 children: [
218 %{
219 key: :enabled,
220 label: "Mailer Enabled",
221 type: :boolean
222 },
223 %{
224 key: :adapter,
225 type: :module,
226 description:
227 "One of the mail adapters listed in [Swoosh documentation](https://hexdocs.pm/swoosh/Swoosh.html#module-adapters)",
228 suggestions: [
229 Swoosh.Adapters.AmazonSES,
230 Swoosh.Adapters.Dyn,
231 Swoosh.Adapters.Gmail,
232 Swoosh.Adapters.Mailgun,
233 Swoosh.Adapters.Mailjet,
234 Swoosh.Adapters.Mandrill,
235 Swoosh.Adapters.Postmark,
236 Swoosh.Adapters.SMTP,
237 Swoosh.Adapters.Sendgrid,
238 Swoosh.Adapters.Sendmail,
239 Swoosh.Adapters.SocketLabs,
240 Swoosh.Adapters.SparkPost
241 ]
242 },
243 %{
244 group: {:subgroup, Swoosh.Adapters.SMTP},
245 key: :relay,
246 type: :string,
247 description: "Hostname or IP address",
248 suggestions: ["smtp.example.com"]
249 },
250 %{
251 group: {:subgroup, Swoosh.Adapters.SMTP},
252 key: :port,
253 type: :integer,
254 description: "SMTP port",
255 suggestions: ["1025"]
256 },
257 %{
258 group: {:subgroup, Swoosh.Adapters.SMTP},
259 key: :username,
260 type: :string,
261 description: "SMTP AUTH username",
262 suggestions: ["user@example.com"]
263 },
264 %{
265 group: {:subgroup, Swoosh.Adapters.SMTP},
266 key: :password,
267 type: :string,
268 description: "SMTP AUTH password",
269 suggestions: ["password"]
270 },
271 %{
272 group: {:subgroup, Swoosh.Adapters.SMTP},
273 key: :ssl,
274 label: "Use SSL",
275 type: :boolean,
276 description: "Use Implicit SSL/TLS. e.g. port 465"
277 },
278 %{
279 group: {:subgroup, Swoosh.Adapters.SMTP},
280 key: :tls,
281 label: "STARTTLS Mode",
282 type: {:dropdown, :atom},
283 description: "Explicit TLS (STARTTLS) enforcement mode",
284 suggestions: [:if_available, :always, :never]
285 },
286 %{
287 group: {:subgroup, Swoosh.Adapters.SMTP},
288 key: :auth,
289 label: "AUTH Mode",
290 type: {:dropdown, :atom},
291 description: "SMTP AUTH enforcement mode",
292 suggestions: [:if_available, :always, :never]
293 },
294 %{
295 group: {:subgroup, Swoosh.Adapters.SMTP},
296 key: :retries,
297 type: :integer,
298 description: "SMTP temporary (4xx) error retries",
299 suggestions: [1]
300 },
301 %{
302 group: {:subgroup, Swoosh.Adapters.Sendgrid},
303 key: :api_key,
304 label: "SendGrid API Key",
305 type: :string,
306 suggestions: ["YOUR_API_KEY"]
307 },
308 %{
309 group: {:subgroup, Swoosh.Adapters.Sendmail},
310 key: :cmd_path,
311 type: :string,
312 suggestions: ["/usr/bin/sendmail"]
313 },
314 %{
315 group: {:subgroup, Swoosh.Adapters.Sendmail},
316 key: :cmd_args,
317 type: :string,
318 suggestions: ["-N delay,failure,success"]
319 },
320 %{
321 group: {:subgroup, Swoosh.Adapters.Sendmail},
322 key: :qmail,
323 label: "Qmail compat mode",
324 type: :boolean
325 },
326 %{
327 group: {:subgroup, Swoosh.Adapters.Mandrill},
328 key: :api_key,
329 label: "Mandrill API Key",
330 type: :string,
331 suggestions: ["YOUR_API_KEY"]
332 },
333 %{
334 group: {:subgroup, Swoosh.Adapters.Mailgun},
335 key: :api_key,
336 label: "Mailgun API Key",
337 type: :string,
338 suggestions: ["YOUR_API_KEY"]
339 },
340 %{
341 group: {:subgroup, Swoosh.Adapters.Mailgun},
342 key: :domain,
343 type: :string,
344 suggestions: ["YOUR_DOMAIN_NAME"]
345 },
346 %{
347 group: {:subgroup, Swoosh.Adapters.Mailjet},
348 key: :api_key,
349 label: "MailJet Public API Key",
350 type: :string,
351 suggestions: ["MJ_APIKEY_PUBLIC"]
352 },
353 %{
354 group: {:subgroup, Swoosh.Adapters.Mailjet},
355 key: :secret,
356 label: "MailJet Private API Key",
357 type: :string,
358 suggestions: ["MJ_APIKEY_PRIVATE"]
359 },
360 %{
361 group: {:subgroup, Swoosh.Adapters.Postmark},
362 key: :api_key,
363 label: "Postmark API Key",
364 type: :string,
365 suggestions: ["X-Postmark-Server-Token"]
366 },
367 %{
368 group: {:subgroup, Swoosh.Adapters.SparkPost},
369 key: :api_key,
370 label: "SparkPost API key",
371 type: :string,
372 suggestions: ["YOUR_API_KEY"]
373 },
374 %{
375 group: {:subgroup, Swoosh.Adapters.SparkPost},
376 key: :endpoint,
377 type: :string,
378 suggestions: ["https://api.sparkpost.com/api/v1"]
379 },
380 %{
381 group: {:subgroup, Swoosh.Adapters.AmazonSES},
382 key: :access_key,
383 label: "AWS Access Key",
384 type: :string,
385 suggestions: ["AWS_ACCESS_KEY"]
386 },
387 %{
388 group: {:subgroup, Swoosh.Adapters.AmazonSES},
389 key: :secret,
390 label: "AWS Secret Key",
391 type: :string,
392 suggestions: ["AWS_SECRET_KEY"]
393 },
394 %{
395 group: {:subgroup, Swoosh.Adapters.AmazonSES},
396 key: :region,
397 label: "AWS Region",
398 type: :string,
399 suggestions: ["us-east-1", "us-east-2"]
400 },
401 %{
402 group: {:subgroup, Swoosh.Adapters.Dyn},
403 key: :api_key,
404 label: "Dyn API Key",
405 type: :string,
406 suggestions: ["apikey"]
407 },
408 %{
409 group: {:subgroup, Swoosh.Adapters.SocketLabs},
410 key: :api_key,
411 label: "SocketLabs API Key",
412 type: :string,
413 suggestions: ["INJECTION_API_KEY"]
414 },
415 %{
416 group: {:subgroup, Swoosh.Adapters.SocketLabs},
417 key: :server_id,
418 label: "Server ID",
419 type: :string,
420 suggestions: ["SERVER_ID"]
421 },
422 %{
423 group: {:subgroup, Swoosh.Adapters.Gmail},
424 key: :access_token,
425 label: "GMail API Access Token",
426 type: :string,
427 suggestions: ["GMAIL_API_ACCESS_TOKEN"]
428 }
429 ]
430 },
431 %{
432 group: :pleroma,
433 key: :uri_schemes,
434 label: "URI Schemes",
435 type: :group,
436 description: "URI schemes related settings",
437 children: [
438 %{
439 key: :valid_schemes,
440 type: {:list, :string},
441 description: "List of the scheme part that is considered valid to be an URL",
442 suggestions: [
443 "https",
444 "http",
445 "dat",
446 "dweb",
447 "gopher",
448 "hyper",
449 "ipfs",
450 "ipns",
451 "irc",
452 "ircs",
453 "magnet",
454 "mailto",
455 "mumble",
456 "ssb",
457 "xmpp"
458 ]
459 }
460 ]
461 },
462 %{
463 group: :pleroma,
464 key: :features,
465 type: :group,
466 description: "Customizable features",
467 children: [
468 %{
469 key: :improved_hashtag_timeline,
470 type: {:dropdown, :atom},
471 description:
472 "Setting to force toggle / force disable improved hashtags timeline. `:enabled` forces hashtags to be fetched from `hashtags` table for hashtags timeline. `:disabled` forces object-embedded hashtags to be used (slower). Keep it `:auto` for automatic behaviour (it is auto-set to `:enabled` [unless overridden] when HashtagsTableMigrator completes).",
473 suggestions: [:auto, :enabled, :disabled]
474 }
475 ]
476 },
477 %{
478 group: :pleroma,
479 key: :populate_hashtags_table,
480 type: :group,
481 description: "`populate_hashtags_table` background migration settings",
482 children: [
483 %{
484 key: :fault_rate_allowance,
485 type: :float,
486 description:
487 "Max accepted rate of objects that failed in the migration. Any value from 0.0 which tolerates no errors to 1.0 which will enable the feature even if hashtags transfer failed for all records.",
488 suggestions: [0.01]
489 },
490 %{
491 key: :sleep_interval_ms,
492 type: :integer,
493 description:
494 "Sleep interval between each chunk of processed records in order to decrease the load on the system (defaults to 0 and should be keep default on most instances)."
495 }
496 ]
497 },
498 %{
499 group: :pleroma,
500 key: :instance,
501 type: :group,
502 description: "Instance-related settings",
503 children: [
504 %{
505 key: :name,
506 type: :string,
507 description: "Name of the instance",
508 suggestions: [
509 "Pleroma"
510 ]
511 },
512 %{
513 key: :languages,
514 type: {:list, :string},
515 description: "Languages the instance uses",
516 suggestions: [
517 "en",
518 "ja",
519 "fr"
520 ]
521 },
522 %{
523 key: :email,
524 label: "Admin Email Address",
525 type: :string,
526 description: "Email used to reach an Administrator/Moderator of the instance",
527 suggestions: [
528 "email@example.com"
529 ]
530 },
531 %{
532 key: :notify_email,
533 label: "Sender Email Address",
534 type: :string,
535 description: "Envelope FROM address for mail sent via Pleroma",
536 suggestions: [
537 "notify@example.com"
538 ]
539 },
540 %{
541 key: :description,
542 type: :string,
543 description:
544 "The instance's description. It can be seen in nodeinfo and `/api/v1/instance`",
545 suggestions: [
546 "Very cool instance"
547 ]
548 },
549 %{
550 key: :limit,
551 type: :integer,
552 description: "Posts character limit (CW/Subject included in the counter)",
553 suggestions: [
554 5_000
555 ]
556 },
557 %{
558 key: :remote_limit,
559 type: :integer,
560 description: "Hard character limit beyond which remote posts will be dropped",
561 suggestions: [
562 100_000
563 ]
564 },
565 %{
566 key: :upload_limit,
567 type: :integer,
568 description: "File size limit of uploads (except for avatar, background, banner)",
569 suggestions: [
570 16_000_000
571 ]
572 },
573 %{
574 key: :avatar_upload_limit,
575 type: :integer,
576 description: "File size limit of user's profile avatars",
577 suggestions: [
578 2_000_000
579 ]
580 },
581 %{
582 key: :background_upload_limit,
583 type: :integer,
584 description: "File size limit of user's profile backgrounds",
585 suggestions: [
586 4_000_000
587 ]
588 },
589 %{
590 key: :banner_upload_limit,
591 type: :integer,
592 description: "File size limit of user's profile banners",
593 suggestions: [
594 4_000_000
595 ]
596 },
597 %{
598 key: :poll_limits,
599 type: :map,
600 description: "A map with poll limits for local polls",
601 suggestions: [
602 %{
603 max_options: 20,
604 max_option_chars: 200,
605 min_expiration: 0,
606 max_expiration: 31_536_000
607 }
608 ],
609 children: [
610 %{
611 key: :max_options,
612 type: :integer,
613 description: "Maximum number of options",
614 suggestions: [20]
615 },
616 %{
617 key: :max_option_chars,
618 type: :integer,
619 description: "Maximum number of characters per option",
620 suggestions: [200]
621 },
622 %{
623 key: :min_expiration,
624 type: :integer,
625 description: "Minimum expiration time (in seconds)",
626 suggestions: [0]
627 },
628 %{
629 key: :max_expiration,
630 type: :integer,
631 description: "Maximum expiration time (in seconds)",
632 suggestions: [3600]
633 }
634 ]
635 },
636 %{
637 key: :registrations_open,
638 type: :boolean,
639 description:
640 "Enable registrations for anyone. Invitations require this setting to be disabled."
641 },
642 %{
643 key: :invites_enabled,
644 type: :boolean,
645 description:
646 "Enable user invitations for admins (depends on `registrations_open` being disabled)"
647 },
648 %{
649 key: :account_activation_required,
650 type: :boolean,
651 description: "Require users to confirm their emails before signing in"
652 },
653 %{
654 key: :account_approval_required,
655 type: :boolean,
656 description: "Require users to be manually approved by an admin before signing in"
657 },
658 %{
659 key: :federating,
660 type: :boolean,
661 description: "Enable federation with other instances"
662 },
663 %{
664 key: :federation_incoming_replies_max_depth,
665 label: "Fed. incoming replies max depth",
666 type: :integer,
667 description:
668 "Max. depth of reply-to and reply activities fetching on incoming federation, to prevent out-of-memory situations while" <>
669 " fetching very long threads. If set to `nil`, threads of any depth will be fetched. Lower this value if you experience out-of-memory crashes.",
670 suggestions: [
671 100
672 ]
673 },
674 %{
675 key: :federation_reachability_timeout_days,
676 label: "Fed. reachability timeout days",
677 type: :integer,
678 description:
679 "Timeout (in days) of each external federation target being unreachable prior to pausing federating to it",
680 suggestions: [
681 7
682 ]
683 },
684 %{
685 key: :allow_relay,
686 type: :boolean,
687 description:
688 "Permits remote instances to subscribe to all public posts of your instance. (Important!) This may increase the visibility of your instance."
689 },
690 %{
691 key: :public,
692 type: :boolean,
693 description:
694 "Switching this on will allow unauthenticated users access to all public resources on your instance" <>
695 " Switching it off is useful for disabling the Local Timeline and The Whole Known Network. " <>
696 " Note: when setting to `false`, please also check `:restrict_unauthenticated` setting."
697 },
698 %{
699 key: :quarantined_instances,
700 type: {:list, :tuple},
701 key_placeholder: "instance",
702 value_placeholder: "reason",
703 description:
704 "(Deprecated, will be removed in next release) List of ActivityPub instances where activities will not be sent, and the reason for doing so",
705 suggestions: [
706 {"quarantined.com", "Reason"},
707 {"*.quarantined.com", "Reason"}
708 ]
709 },
710 %{
711 key: :static_dir,
712 type: :string,
713 description: "Instance static directory",
714 suggestions: [
715 "instance/static/"
716 ]
717 },
718 %{
719 key: :allowed_post_formats,
720 type: {:list, :string},
721 description: "MIME-type list of formats allowed to be posted (transformed into HTML)",
722 suggestions: [
723 "text/plain",
724 "text/html",
725 "text/markdown",
726 "text/bbcode",
727 "text/x.misskeymarkdown"
728 ]
729 },
730 %{
731 key: :extended_nickname_format,
732 type: :boolean,
733 description:
734 "Enable to use extended local nicknames format (allows underscores/dashes)." <>
735 " This will break federation with older software for theses nicknames."
736 },
737 %{
738 key: :cleanup_attachments,
739 type: :boolean,
740 description: """
741 Enable to remove associated attachments when status is removed.
742 This will not affect duplicates and attachments without status.
743 Enabling this will increase load to database when deleting statuses on larger instances.
744 """
745 },
746 %{
747 key: :max_pinned_statuses,
748 type: :integer,
749 description: "The maximum number of pinned statuses. 0 will disable the feature.",
750 suggestions: [
751 0,
752 1,
753 3
754 ]
755 },
756 %{
757 key: :autofollowed_nicknames,
758 type: {:list, :string},
759 description:
760 "Set to nicknames of (local) users that every new user should automatically follow"
761 },
762 %{
763 key: :autofollowing_nicknames,
764 type: {:list, :string},
765 description:
766 "Set to nicknames of (local) users that automatically follows every newly registered user"
767 },
768 %{
769 key: :attachment_links,
770 type: :boolean,
771 description: "Enable to automatically add attachment link text to statuses"
772 },
773 %{
774 key: :max_report_comment_size,
775 type: :integer,
776 description: "The maximum size of the report comment. Default: 1000.",
777 suggestions: [
778 1_000
779 ]
780 },
781 %{
782 key: :safe_dm_mentions,
783 label: "Safe DM mentions",
784 type: :boolean,
785 description:
786 "If enabled, only mentions at the beginning of a post will be used to address people in direct messages." <>
787 " This is to prevent accidental mentioning of people when talking about them (e.g. \"@admin please keep an eye on @bad_actor\")." <>
788 " Default: disabled"
789 },
790 %{
791 key: :healthcheck,
792 type: :boolean,
793 description: "If enabled, system data will be shown on `/api/pleroma/healthcheck`"
794 },
795 %{
796 key: :remote_post_retention_days,
797 type: :integer,
798 description:
799 "The default amount of days to retain remote posts when pruning the database",
800 suggestions: [
801 90
802 ]
803 },
804 %{
805 key: :user_bio_length,
806 type: :integer,
807 description: "A user bio maximum length. Default: 5000.",
808 suggestions: [
809 5_000
810 ]
811 },
812 %{
813 key: :user_name_length,
814 type: :integer,
815 description: "A user name maximum length. Default: 100.",
816 suggestions: [
817 100
818 ]
819 },
820 %{
821 key: :skip_thread_containment,
822 type: :boolean,
823 description: "Skip filtering out broken threads. Default: enabled."
824 },
825 %{
826 key: :limit_to_local_content,
827 type: {:dropdown, :atom},
828 description:
829 "Limit unauthenticated users to search for local statutes and users only. Default: `:unauthenticated`.",
830 suggestions: [
831 :unauthenticated,
832 :all,
833 false
834 ]
835 },
836 %{
837 key: :max_account_fields,
838 type: :integer,
839 description: "The maximum number of custom fields in the user profile. Default: 10.",
840 suggestions: [
841 10
842 ]
843 },
844 %{
845 key: :max_remote_account_fields,
846 type: :integer,
847 description:
848 "The maximum number of custom fields in the remote user profile. Default: 20.",
849 suggestions: [
850 20
851 ]
852 },
853 %{
854 key: :account_field_name_length,
855 type: :integer,
856 description: "An account field name maximum length. Default: 512.",
857 suggestions: [
858 512
859 ]
860 },
861 %{
862 key: :account_field_value_length,
863 type: :integer,
864 description: "An account field value maximum length. Default: 2048.",
865 suggestions: [
866 2048
867 ]
868 },
869 %{
870 key: :registration_reason_length,
871 type: :integer,
872 description: "Maximum registration reason length. Default: 500.",
873 suggestions: [
874 500
875 ]
876 },
877 %{
878 key: :external_user_synchronization,
879 type: :boolean,
880 description: "Enabling following/followers counters synchronization for external users"
881 },
882 %{
883 key: :multi_factor_authentication,
884 type: :keyword,
885 description: "Multi-factor authentication settings",
886 suggestions: [
887 [
888 totp: [digits: 6, period: 30],
889 backup_codes: [number: 5, length: 16]
890 ]
891 ],
892 children: [
893 %{
894 key: :totp,
895 label: "TOTP settings",
896 type: :keyword,
897 description: "TOTP settings",
898 suggestions: [digits: 6, period: 30],
899 children: [
900 %{
901 key: :digits,
902 type: :integer,
903 suggestions: [6],
904 description:
905 "Determines the length of a one-time pass-code, in characters. Defaults to 6 characters."
906 },
907 %{
908 key: :period,
909 type: :integer,
910 suggestions: [30],
911 description:
912 "A period for which the TOTP code will be valid, in seconds. Defaults to 30 seconds."
913 }
914 ]
915 },
916 %{
917 key: :backup_codes,
918 type: :keyword,
919 description: "MFA backup codes settings",
920 suggestions: [number: 5, length: 16],
921 children: [
922 %{
923 key: :number,
924 type: :integer,
925 suggestions: [5],
926 description: "Number of backup codes to generate."
927 },
928 %{
929 key: :length,
930 type: :integer,
931 suggestions: [16],
932 description:
933 "Determines the length of backup one-time pass-codes, in characters. Defaults to 16 characters."
934 }
935 ]
936 }
937 ]
938 },
939 %{
940 key: :instance_thumbnail,
941 type: {:string, :image},
942 description:
943 "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.",
944 suggestions: ["/instance/thumbnail.jpeg"]
945 },
946 %{
947 key: :show_reactions,
948 type: :boolean,
949 description: "Let favourites and emoji reactions be viewed through the API."
950 },
951 %{
952 key: :profile_directory,
953 type: :boolean,
954 description: "Enable profile directory."
955 },
956 %{
957 key: :privileged_staff,
958 type: :boolean,
959 description:
960 "Let moderators access sensitive data (e.g. updating user credentials, get password reset token, delete users, index and read private statuses)"
961 },
962 %{
963 key: :local_bubble,
964 type: {:list, :string},
965 description:
966 "List of instances that make up your local bubble (closely-related instances). Used to populate the 'bubble' timeline (domain only)."
967 },
968 %{
969 key: :export_prometheus_metrics,
970 type: :boolean,
971 description: "Enable prometheus metrics (at /api/v1/akkoma/metrics)"
972 }
973 ]
974 },
975 %{
976 group: :pleroma,
977 key: :welcome,
978 type: :group,
979 description: "Welcome messages settings",
980 children: [
981 %{
982 key: :direct_message,
983 type: :keyword,
984 descpiption: "Direct message settings",
985 children: [
986 %{
987 key: :enabled,
988 type: :boolean,
989 description: "Enables sending a direct message to newly registered users"
990 },
991 %{
992 key: :message,
993 type: :string,
994 description: "A message that will be sent to newly registered users",
995 suggestions: [
996 "Hi, @username! Welcome on board!"
997 ]
998 },
999 %{
1000 key: :sender_nickname,
1001 type: :string,
1002 description: "The nickname of the local user that sends a welcome message",
1003 suggestions: [
1004 "lain"
1005 ]
1006 }
1007 ]
1008 },
1009 %{
1010 key: :email,
1011 type: :keyword,
1012 descpiption: "Email message settings",
1013 children: [
1014 %{
1015 key: :enabled,
1016 type: :boolean,
1017 description: "Enables sending an email to newly registered users"
1018 },
1019 %{
1020 key: :sender,
1021 type: [:string, :tuple],
1022 description:
1023 "Email address and/or nickname that will be used to send the welcome email.",
1024 suggestions: [
1025 {"Pleroma App", "welcome@pleroma.app"}
1026 ]
1027 },
1028 %{
1029 key: :subject,
1030 type: :string,
1031 description:
1032 "Subject of the welcome email. EEX template with user and instance_name variables can be used.",
1033 suggestions: ["Welcome to <%= instance_name%>"]
1034 },
1035 %{
1036 key: :html,
1037 type: :string,
1038 description:
1039 "HTML content of the welcome email. EEX template with user and instance_name variables can be used.",
1040 suggestions: ["<h1>Hello <%= user.name%>. Welcome to <%= instance_name%></h1>"]
1041 },
1042 %{
1043 key: :text,
1044 type: :string,
1045 description:
1046 "Text content of the welcome email. EEX template with user and instance_name variables can be used.",
1047 suggestions: ["Hello <%= user.name%>. \n Welcome to <%= instance_name%>\n"]
1048 }
1049 ]
1050 }
1051 ]
1052 },
1053 %{
1054 group: :logger,
1055 type: :group,
1056 description: "Logger-related settings",
1057 children: [
1058 %{
1059 key: :backends,
1060 type: [:atom, :tuple, :module],
1061 description:
1062 "Where logs will be sent, :console - send logs to stdout, { ExSyslogger, :ex_syslogger } - to syslog, Quack.Logger - to Slack.",
1063 suggestions: [:console, {ExSyslogger, :ex_syslogger}, Quack.Logger]
1064 }
1065 ]
1066 },
1067 %{
1068 group: :logger,
1069 type: :group,
1070 key: :ex_syslogger,
1071 label: "ExSyslogger",
1072 description: "ExSyslogger-related settings",
1073 children: [
1074 %{
1075 key: :level,
1076 type: {:dropdown, :atom},
1077 description: "Log level",
1078 suggestions: [:debug, :info, :warn, :error]
1079 },
1080 %{
1081 key: :ident,
1082 type: :string,
1083 description:
1084 "A string that's prepended to every message, and is typically set to the app name",
1085 suggestions: ["pleroma"]
1086 },
1087 %{
1088 key: :format,
1089 type: :string,
1090 description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\"",
1091 suggestions: ["$metadata[$level] $message"]
1092 },
1093 %{
1094 key: :metadata,
1095 type: {:list, :atom},
1096 suggestions: [:request_id]
1097 }
1098 ]
1099 },
1100 %{
1101 group: :logger,
1102 type: :group,
1103 key: :console,
1104 label: "Console Logger",
1105 description: "Console logger settings",
1106 children: [
1107 %{
1108 key: :level,
1109 type: {:dropdown, :atom},
1110 description: "Log level",
1111 suggestions: [:debug, :info, :warn, :error]
1112 },
1113 %{
1114 key: :format,
1115 type: :string,
1116 description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\"",
1117 suggestions: ["$metadata[$level] $message"]
1118 },
1119 %{
1120 key: :metadata,
1121 type: {:list, :atom},
1122 suggestions: [:request_id]
1123 }
1124 ]
1125 },
1126 %{
1127 group: :pleroma,
1128 key: :frontend_configurations,
1129 type: :group,
1130 description:
1131 "This form can be used to configure a keyword list that keeps the configuration data for any " <>
1132 "kind of frontend. By default, settings for pleroma_fe and masto_fe are configured. If you want to " <>
1133 "add your own configuration your settings all fields must be complete.",
1134 children: [
1135 %{
1136 key: :pleroma_fe,
1137 label: "Pleroma FE",
1138 type: :map,
1139 description: "Settings for Pleroma FE",
1140 suggestions: [
1141 %{
1142 alwaysShowSubjectInput: true,
1143 background: "/static/aurora_borealis.jpg",
1144 collapseMessageWithSubject: false,
1145 greentext: false,
1146 hideFilteredStatuses: false,
1147 hideMutedPosts: false,
1148 hidePostStats: false,
1149 hideUserStats: false,
1150 loginMethod: "password",
1151 logo: "/static/logo.svg",
1152 logoMargin: ".1em",
1153 logoMask: true,
1154 minimalScopesMode: false,
1155 noAttachmentLinks: false,
1156 nsfwCensorImage: "/static/img/nsfw.74818f9.png",
1157 postContentType: "text/plain",
1158 redirectRootLogin: "/main/friends",
1159 redirectRootNoLogin: "/main/all",
1160 scopeCopy: true,
1161 sidebarRight: false,
1162 showFeaturesPanel: true,
1163 showInstanceSpecificPanel: false,
1164 subjectLineBehavior: "email",
1165 theme: "pleroma-dark",
1166 webPushNotifications: false
1167 }
1168 ],
1169 children: [
1170 %{
1171 key: :alwaysShowSubjectInput,
1172 label: "Always show subject input",
1173 type: :boolean,
1174 description: "When disabled, auto-hide the subject field if it's empty"
1175 },
1176 %{
1177 key: :background,
1178 type: {:string, :image},
1179 description:
1180 "URL of the background, unless viewing a user profile with a background that is set",
1181 suggestions: ["/images/city.jpg"]
1182 },
1183 %{
1184 key: :collapseMessageWithSubject,
1185 label: "Collapse message with subject",
1186 type: :boolean,
1187 description:
1188 "When a message has a subject (aka Content Warning), collapse it by default"
1189 },
1190 %{
1191 key: :greentext,
1192 label: "Greentext",
1193 type: :boolean,
1194 description: "Enables green text on lines prefixed with the > character"
1195 },
1196 %{
1197 key: :conversationDisplay,
1198 label: "Conversation display style",
1199 type: :string,
1200 description: "How to display conversations (linear or tree)",
1201 suggestions: ["linear", "tree"]
1202 },
1203 %{
1204 key: :hideFilteredStatuses,
1205 label: "Hide Filtered Statuses",
1206 type: :boolean,
1207 description: "Hides filtered statuses from timelines"
1208 },
1209 %{
1210 key: :hideMutedPosts,
1211 label: "Hide Muted Posts",
1212 type: :boolean,
1213 description: "Hides muted statuses from timelines"
1214 },
1215 %{
1216 key: :hidePostStats,
1217 label: "Hide post stats",
1218 type: :boolean,
1219 description: "Hide notices statistics (repeats, favorites, ...)"
1220 },
1221 %{
1222 key: :hideUserStats,
1223 label: "Hide user stats",
1224 type: :boolean,
1225 description:
1226 "Hide profile statistics (posts, posts per day, followers, followings, ...)"
1227 },
1228 %{
1229 key: :logo,
1230 type: {:string, :image},
1231 description: "URL of the logo, defaults to Pleroma's logo",
1232 suggestions: ["/static/logo.svg"]
1233 },
1234 %{
1235 key: :logoMargin,
1236 label: "Logo margin",
1237 type: :string,
1238 description:
1239 "Allows you to adjust vertical margins between logo boundary and navbar borders. " <>
1240 "The idea is that to have logo's image without any extra margins and instead adjust them to your need in layout.",
1241 suggestions: [".1em"]
1242 },
1243 %{
1244 key: :logoMask,
1245 label: "Logo mask",
1246 type: :boolean,
1247 description:
1248 "By default it assumes logo used will be monochrome with alpha channel to be compatible with both light and dark themes. " <>
1249 "If you want a colorful logo you must disable logoMask."
1250 },
1251 %{
1252 key: :nsfwCensorImage,
1253 label: "NSFW Censor Image",
1254 type: {:string, :image},
1255 description:
1256 "URL of the image to use for hiding NSFW media attachments in the timeline",
1257 suggestions: ["/static/img/nsfw.74818f9.png"]
1258 },
1259 %{
1260 key: :postContentType,
1261 label: "Post Content Type",
1262 type: {:dropdown, :atom},
1263 description: "Default post formatting option",
1264 suggestions: [
1265 "text/plain",
1266 "text/html",
1267 "text/markdown",
1268 "text/bbcode",
1269 "text/x.misskeymarkdown"
1270 ]
1271 },
1272 %{
1273 key: :redirectRootNoLogin,
1274 label: "Redirect root no login",
1275 type: :string,
1276 description:
1277 "Relative URL which indicates where to redirect when a user isn't logged in",
1278 suggestions: ["/main/all"]
1279 },
1280 %{
1281 key: :redirectRootLogin,
1282 label: "Redirect root login",
1283 type: :string,
1284 description:
1285 "Relative URL which indicates where to redirect when a user is logged in",
1286 suggestions: ["/main/friends"]
1287 },
1288 %{
1289 key: :scopeCopy,
1290 label: "Scope copy",
1291 type: :boolean,
1292 description: "Copy the scope (private/unlisted/public) in replies to posts by default"
1293 },
1294 %{
1295 key: :sidebarRight,
1296 label: "Sidebar on Right",
1297 type: :boolean,
1298 description: "Change alignment of sidebar and panels to the right"
1299 },
1300 %{
1301 key: :showFeaturesPanel,
1302 label: "Show instance features panel",
1303 type: :boolean,
1304 description:
1305 "Enables panel displaying functionality of the instance on the About page"
1306 },
1307 %{
1308 key: :showInstanceSpecificPanel,
1309 label: "Show instance specific panel",
1310 type: :boolean,
1311 description: "Whether to show the instance's custom panel"
1312 },
1313 %{
1314 key: :subjectLineBehavior,
1315 label: "Subject line behavior",
1316 type: :string,
1317 description: "Allows changing the default behaviour of subject lines in replies.
1318 `email`: copy and preprend re:, as in email,
1319 `masto`: copy verbatim, as in Mastodon,
1320 `noop`: don't copy the subject.",
1321 suggestions: ["email", "masto", "noop"]
1322 },
1323 %{
1324 key: :theme,
1325 type: :string,
1326 description: "Which theme to use. Available themes are defined in styles.json",
1327 suggestions: ["pleroma-dark"]
1328 },
1329 %{
1330 key: :showPanelNavShortcuts,
1331 label: "Show timeline panel nav shortcuts",
1332 type: :boolean,
1333 description: "Whether to put timeline nav tabs on the top of the panel"
1334 },
1335 %{
1336 key: :showNavShortcuts,
1337 label: "Show navbar shortcuts",
1338 type: :boolean,
1339 description: "Whether to put extra navigation options on the navbar"
1340 },
1341 %{
1342 key: :showWiderShortcuts,
1343 label: "Increase navbar shortcut spacing",
1344 type: :boolean,
1345 description: "Whether to add extra space between navbar icons"
1346 },
1347 %{
1348 key: :hideSiteFavicon,
1349 label: "Hide site favicon",
1350 type: :boolean,
1351 description: "Whether to hide the instance favicon from the navbar"
1352 },
1353 %{
1354 key: :hideSiteName,
1355 label: "Hide site name",
1356 type: :boolean,
1357 description: "Whether to hide the site name from the navbar"
1358 },
1359 %{
1360 key: :renderMisskeyMarkdown,
1361 label: "Render misskey markdown",
1362 type: :boolean,
1363 description: "Whether to render Misskey-flavoured markdown"
1364 },
1365 %{
1366 key: :stopGifs,
1367 label: "Stop Gifs",
1368 type: :boolean,
1369 description: "Whether to pause animated images until they're hovered on"
1370 }
1371 ]
1372 },
1373 %{
1374 key: :masto_fe,
1375 label: "Masto FE",
1376 type: :map,
1377 description: "Settings for Masto FE",
1378 suggestions: [
1379 %{
1380 showInstanceSpecificPanel: true
1381 }
1382 ],
1383 children: [
1384 %{
1385 key: :showInstanceSpecificPanel,
1386 label: "Show instance specific panel",
1387 type: :boolean,
1388 description: "Whenether to show the instance's specific panel"
1389 }
1390 ]
1391 }
1392 ]
1393 },
1394 %{
1395 group: :pleroma,
1396 key: :assets,
1397 type: :group,
1398 description:
1399 "This section configures assets to be used with various frontends. Currently the only option relates to mascots on the mastodon frontend",
1400 children: [
1401 %{
1402 key: :mascots,
1403 type: {:keyword, :map},
1404 description:
1405 "Keyword of mascots, each element must contain both an URL and a mime_type key",
1406 suggestions: [
1407 pleroma_fox_tan: %{
1408 url: "/images/pleroma-fox-tan-smol.png",
1409 mime_type: "image/png"
1410 },
1411 pleroma_fox_tan_shy: %{
1412 url: "/images/pleroma-fox-tan-shy.png",
1413 mime_type: "image/png"
1414 }
1415 ]
1416 },
1417 %{
1418 key: :default_mascot,
1419 type: :atom,
1420 description:
1421 "This will be used as the default mascot on MastoFE. Default: `:pleroma_fox_tan`",
1422 suggestions: [
1423 :pleroma_fox_tan
1424 ]
1425 },
1426 %{
1427 key: :default_user_avatar,
1428 type: {:string, :image},
1429 description: "URL of the default user avatar",
1430 suggestions: ["/images/avi.png"]
1431 }
1432 ]
1433 },
1434 %{
1435 group: :pleroma,
1436 key: :manifest,
1437 type: :group,
1438 description:
1439 "This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE.",
1440 children: [
1441 %{
1442 key: :icons,
1443 type: {:list, :map},
1444 description: "Describe the icons of the app",
1445 suggestion: [
1446 %{
1447 src: "/static/logo.png"
1448 },
1449 %{
1450 src: "/static/icon.png",
1451 type: "image/png"
1452 },
1453 %{
1454 src: "/static/icon.ico",
1455 sizes: "72x72 96x96 128x128 256x256"
1456 }
1457 ]
1458 },
1459 %{
1460 key: :theme_color,
1461 type: :string,
1462 description: "Describe the theme color of the app - this is only used for mastodon-fe",
1463 suggestions: ["#282c37", "mediumpurple"]
1464 },
1465 %{
1466 key: :background_color,
1467 type: :string,
1468 description:
1469 "Describe the background color of the app - this is only used for mastodon-fe",
1470 suggestions: ["#191b22", "aliceblue"]
1471 }
1472 ]
1473 },
1474 %{
1475 group: :pleroma,
1476 key: :media_proxy,
1477 type: :group,
1478 description: "Media proxy",
1479 children: [
1480 %{
1481 key: :enabled,
1482 type: :boolean,
1483 description: "Enables proxying of remote media via the instance's proxy"
1484 },
1485 %{
1486 key: :base_url,
1487 label: "Base URL",
1488 type: :string,
1489 description:
1490 "The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts.",
1491 suggestions: ["https://example.com"]
1492 },
1493 %{
1494 key: :invalidation,
1495 type: :keyword,
1496 descpiption: "",
1497 suggestions: [
1498 enabled: true,
1499 provider: Pleroma.Web.MediaProxy.Invalidation.Script
1500 ],
1501 children: [
1502 %{
1503 key: :enabled,
1504 type: :boolean,
1505 description: "Enables media cache object invalidation."
1506 },
1507 %{
1508 key: :provider,
1509 type: :module,
1510 description: "Module which will be used to purge objects from the cache.",
1511 suggestions: [
1512 Pleroma.Web.MediaProxy.Invalidation.Script,
1513 Pleroma.Web.MediaProxy.Invalidation.Http
1514 ]
1515 }
1516 ]
1517 },
1518 %{
1519 key: :proxy_opts,
1520 label: "Advanced MediaProxy Options",
1521 type: :keyword,
1522 description: "Internal Pleroma.ReverseProxy settings",
1523 suggestions: [
1524 redirect_on_failure: false,
1525 max_body_length: 25 * 1_048_576,
1526 max_read_duration: 30_000
1527 ],
1528 children: [
1529 %{
1530 key: :redirect_on_failure,
1531 type: :boolean,
1532 description: """
1533 Redirects the client to the origin server upon encountering HTTP errors.\n
1534 Note that files larger than Max Body Length will trigger an error. (e.g., Peertube videos)\n\n
1535 **WARNING:** This setting will allow larger files to be accessed, but exposes the\n
1536 IP addresses of your users to the other servers, bypassing the MediaProxy.
1537 """
1538 },
1539 %{
1540 key: :max_body_length,
1541 type: :integer,
1542 description:
1543 "Maximum file size (in bytes) allowed through the Pleroma MediaProxy cache."
1544 },
1545 %{
1546 key: :max_read_duration,
1547 type: :integer,
1548 description: "Timeout (in milliseconds) of GET request to the remote URI."
1549 }
1550 ]
1551 },
1552 %{
1553 key: :whitelist,
1554 type: {:list, :string},
1555 description: "List of hosts with scheme to bypass the MediaProxy",
1556 suggestions: ["http://example.com"]
1557 }
1558 ]
1559 },
1560 %{
1561 group: :pleroma,
1562 key: :media_preview_proxy,
1563 type: :group,
1564 description: "Media preview proxy",
1565 children: [
1566 %{
1567 key: :enabled,
1568 type: :boolean,
1569 description:
1570 "Enables proxying of remote media preview to the instance's proxy. Requires enabled media proxy."
1571 },
1572 %{
1573 key: :thumbnail_max_width,
1574 type: :integer,
1575 description:
1576 "Max width of preview thumbnail for images (video preview always has original dimensions)."
1577 },
1578 %{
1579 key: :thumbnail_max_height,
1580 type: :integer,
1581 description:
1582 "Max height of preview thumbnail for images (video preview always has original dimensions)."
1583 },
1584 %{
1585 key: :image_quality,
1586 type: :integer,
1587 description: "Quality of the output. Ranges from 0 (min quality) to 100 (max quality)."
1588 },
1589 %{
1590 key: :min_content_length,
1591 type: :integer,
1592 description:
1593 "Min content length (in bytes) to perform preview. Media smaller in size will be served without thumbnailing."
1594 }
1595 ]
1596 },
1597 %{
1598 group: :pleroma,
1599 key: Pleroma.Web.MediaProxy.Invalidation.Http,
1600 type: :group,
1601 description: "HTTP invalidate settings",
1602 children: [
1603 %{
1604 key: :method,
1605 type: :atom,
1606 description: "HTTP method of request. Default: :purge"
1607 },
1608 %{
1609 key: :headers,
1610 type: {:keyword, :string},
1611 description: "HTTP headers of request",
1612 suggestions: [{"x-refresh", 1}]
1613 },
1614 %{
1615 key: :options,
1616 type: :keyword,
1617 description: "Request options",
1618 children: [
1619 %{
1620 key: :params,
1621 type: {:map, :string}
1622 }
1623 ]
1624 }
1625 ]
1626 },
1627 %{
1628 group: :pleroma,
1629 key: Pleroma.Web.MediaProxy.Invalidation.Script,
1630 type: :group,
1631 description: "Invalidation script settings",
1632 children: [
1633 %{
1634 key: :script_path,
1635 type: :string,
1636 description: "Path to executable script which will purge cached items.",
1637 suggestions: ["./installation/nginx-cache-purge.sh.example"]
1638 },
1639 %{
1640 key: :url_format,
1641 label: "URL Format",
1642 type: :string,
1643 description:
1644 "Optional URL format preprocessing. Only required for Apache's htcacheclean.",
1645 suggestions: [":htcacheclean"]
1646 }
1647 ]
1648 },
1649 %{
1650 group: :pleroma,
1651 key: :activitypub,
1652 label: "ActivityPub",
1653 type: :group,
1654 description: "ActivityPub-related settings",
1655 children: [
1656 %{
1657 key: :unfollow_blocked,
1658 type: :boolean,
1659 description: "Whether blocks result in people getting unfollowed"
1660 },
1661 %{
1662 key: :outgoing_blocks,
1663 type: :boolean,
1664 description: "Whether to federate blocks to other instances"
1665 },
1666 %{
1667 key: :blockers_visible,
1668 type: :boolean,
1669 description: "Whether a user can see someone who has blocked them"
1670 },
1671 %{
1672 key: :sign_object_fetches,
1673 type: :boolean,
1674 description: "Sign object fetches with HTTP signatures"
1675 },
1676 %{
1677 key: :authorized_fetch_mode,
1678 type: :boolean,
1679 description: "Require HTTP signatures on AP fetches"
1680 },
1681 %{
1682 key: :note_replies_output_limit,
1683 type: :integer,
1684 description:
1685 "The number of Note replies' URIs to be included with outgoing federation (`5` to match Mastodon hardcoded value, `0` to disable the output)"
1686 },
1687 %{
1688 key: :follow_handshake_timeout,
1689 type: :integer,
1690 description: "Following handshake timeout",
1691 suggestions: [500]
1692 },
1693 %{
1694 key: :max_collection_objects,
1695 type: :integer,
1696 description:
1697 "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.",
1698 suggestions: [50]
1699 }
1700 ]
1701 },
1702 %{
1703 group: :pleroma,
1704 key: :http_security,
1705 label: "HTTP security",
1706 type: :group,
1707 description: "HTTP security settings",
1708 children: [
1709 %{
1710 key: :enabled,
1711 type: :boolean,
1712 description: "Whether the managed content security policy is enabled"
1713 },
1714 %{
1715 key: :sts,
1716 label: "STS",
1717 type: :boolean,
1718 description: "Whether to additionally send a Strict-Transport-Security header"
1719 },
1720 %{
1721 key: :sts_max_age,
1722 label: "STS max age",
1723 type: :integer,
1724 description: "The maximum age for the Strict-Transport-Security header if sent",
1725 suggestions: [63_072_000]
1726 },
1727 %{
1728 key: :referrer_policy,
1729 type: :string,
1730 description: "The referrer policy to use, either \"same-origin\" or \"no-referrer\"",
1731 suggestions: ["same-origin", "no-referrer"]
1732 },
1733 %{
1734 key: :report_uri,
1735 label: "Report URI",
1736 type: :string,
1737 description: "Adds the specified URL to report-uri and report-to group in CSP header",
1738 suggestions: ["https://example.com/report-uri"]
1739 }
1740 ]
1741 },
1742 %{
1743 group: :web_push_encryption,
1744 key: :vapid_details,
1745 label: "Vapid Details",
1746 type: :group,
1747 description:
1748 "Web Push Notifications configuration. You can use the mix task mix web_push.gen.keypair to generate it.",
1749 children: [
1750 %{
1751 key: :subject,
1752 type: :string,
1753 description:
1754 "A mailto link for the administrative contact." <>
1755 " It's best if this email is not a personal email address, but rather a group email to the instance moderation team.",
1756 suggestions: ["mailto:moderators@pleroma.com"]
1757 },
1758 %{
1759 key: :public_key,
1760 type: :string,
1761 description: "VAPID public key",
1762 suggestions: ["Public key"]
1763 },
1764 %{
1765 key: :private_key,
1766 type: :string,
1767 description: "VAPID private key",
1768 suggestions: ["Private key"]
1769 }
1770 ]
1771 },
1772 %{
1773 group: :pleroma,
1774 key: Pleroma.Captcha,
1775 type: :group,
1776 description: "Captcha-related settings",
1777 children: [
1778 %{
1779 key: :enabled,
1780 type: :boolean,
1781 description: "Whether the captcha should be shown on registration"
1782 },
1783 %{
1784 key: :method,
1785 type: :module,
1786 description: "The method/service to use for captcha",
1787 suggestions: [Pleroma.Captcha.Kocaptcha, Pleroma.Captcha.Native]
1788 },
1789 %{
1790 key: :seconds_valid,
1791 type: :integer,
1792 description: "The time in seconds for which the captcha is valid",
1793 suggestions: [60]
1794 }
1795 ]
1796 },
1797 %{
1798 group: :pleroma,
1799 key: Pleroma.Captcha.Kocaptcha,
1800 type: :group,
1801 description:
1802 "Kocaptcha is a very simple captcha service with a single API endpoint, the source code is" <>
1803 " here: https://github.com/koto-bank/kocaptcha. The default endpoint (https://captcha.kotobank.ch) is hosted by the developer.",
1804 children: [
1805 %{
1806 key: :endpoint,
1807 type: :string,
1808 description: "The kocaptcha endpoint to use",
1809 suggestions: ["https://captcha.kotobank.ch"]
1810 }
1811 ]
1812 },
1813 %{
1814 group: :pleroma,
1815 label: "Pleroma Admin Token",
1816 type: :group,
1817 description:
1818 "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)",
1819 children: [
1820 %{
1821 key: :admin_token,
1822 type: :string,
1823 description: "Admin token",
1824 suggestions: [
1825 "Please use a high entropy string or UUID"
1826 ]
1827 }
1828 ]
1829 },
1830 %{
1831 group: :pleroma,
1832 key: Oban,
1833 type: :group,
1834 description:
1835 "[Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.",
1836 children: [
1837 %{
1838 key: :log,
1839 type: {:dropdown, :atom},
1840 description: "Logs verbose mode",
1841 suggestions: [false, :error, :warn, :info, :debug]
1842 },
1843 %{
1844 key: :queues,
1845 type: {:keyword, :integer},
1846 description:
1847 "Background jobs queues (keys: queues, values: max numbers of concurrent jobs)",
1848 suggestions: [
1849 activity_expiration: 10,
1850 attachments_cleanup: 5,
1851 background: 5,
1852 federator_incoming: 50,
1853 federator_outgoing: 50,
1854 mailer: 10,
1855 scheduled_activities: 10,
1856 transmogrifier: 20,
1857 web_push: 50
1858 ],
1859 children: [
1860 %{
1861 key: :activity_expiration,
1862 type: :integer,
1863 description: "Activity expiration queue",
1864 suggestions: [10]
1865 },
1866 %{
1867 key: :backup,
1868 type: :integer,
1869 description: "Backup queue",
1870 suggestions: [1]
1871 },
1872 %{
1873 key: :attachments_cleanup,
1874 type: :integer,
1875 description: "Attachment deletion queue",
1876 suggestions: [5]
1877 },
1878 %{
1879 key: :background,
1880 type: :integer,
1881 description: "Background queue",
1882 suggestions: [5]
1883 },
1884 %{
1885 key: :federator_incoming,
1886 type: :integer,
1887 description: "Incoming federation queue",
1888 suggestions: [50]
1889 },
1890 %{
1891 key: :federator_outgoing,
1892 type: :integer,
1893 description: "Outgoing federation queue",
1894 suggestions: [50]
1895 },
1896 %{
1897 key: :mailer,
1898 type: :integer,
1899 description: "Email sender queue, see Pleroma.Emails.Mailer",
1900 suggestions: [10]
1901 },
1902 %{
1903 key: :scheduled_activities,
1904 type: :integer,
1905 description: "Scheduled activities queue, see Pleroma.ScheduledActivities",
1906 suggestions: [10]
1907 },
1908 %{
1909 key: :transmogrifier,
1910 type: :integer,
1911 description: "Transmogrifier queue",
1912 suggestions: [20]
1913 },
1914 %{
1915 key: :web_push,
1916 type: :integer,
1917 description: "Web push notifications queue",
1918 suggestions: [50]
1919 }
1920 ]
1921 },
1922 %{
1923 key: :crontab,
1924 type: {:list, :tuple},
1925 description: "Settings for cron background jobs",
1926 suggestions: [
1927 {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
1928 {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
1929 ]
1930 }
1931 ]
1932 },
1933 %{
1934 group: :pleroma,
1935 key: :workers,
1936 type: :group,
1937 description: "Includes custom worker options not interpretable directly by `Oban`",
1938 children: [
1939 %{
1940 key: :retries,
1941 type: {:keyword, :integer},
1942 description: "Max retry attempts for failed jobs, per `Oban` queue",
1943 suggestions: [
1944 federator_incoming: 5,
1945 federator_outgoing: 5
1946 ]
1947 },
1948 %{
1949 key: :timeout,
1950 type: {:keyword, :integer},
1951 description: "Timeout for jobs, per `Oban` queue, in ms",
1952 suggestions: [
1953 activity_expiration: :timer.seconds(5),
1954 token_expiration: :timer.seconds(5),
1955 filter_expiration: :timer.seconds(5),
1956 backup: :timer.seconds(900),
1957 federator_incoming: :timer.seconds(10),
1958 federator_outgoing: :timer.seconds(10),
1959 ingestion_queue: :timer.seconds(5),
1960 web_push: :timer.seconds(5),
1961 mailer: :timer.seconds(5),
1962 transmogrifier: :timer.seconds(5),
1963 scheduled_activities: :timer.seconds(5),
1964 poll_notifications: :timer.seconds(5),
1965 background: :timer.seconds(5),
1966 remote_fetcher: :timer.seconds(10),
1967 attachments_cleanup: :timer.seconds(900),
1968 new_users_digest: :timer.seconds(10),
1969 mute_expire: :timer.seconds(5),
1970 search_indexing: :timer.seconds(5),
1971 nodeinfo_fetcher: :timer.seconds(10)
1972 ]
1973 }
1974 ]
1975 },
1976 %{
1977 group: :pleroma,
1978 key: Pleroma.Web.Metadata,
1979 type: :group,
1980 description: "Metadata-related settings",
1981 children: [
1982 %{
1983 key: :providers,
1984 type: {:list, :module},
1985 description: "List of metadata providers to enable",
1986 suggestions: [
1987 Pleroma.Web.Metadata.Providers.OpenGraph,
1988 Pleroma.Web.Metadata.Providers.TwitterCard,
1989 Pleroma.Web.Metadata.Providers.RelMe,
1990 Pleroma.Web.Metadata.Providers.Feed
1991 ]
1992 },
1993 %{
1994 key: :unfurl_nsfw,
1995 label: "Unfurl NSFW",
1996 type: :boolean,
1997 description: "When enabled NSFW attachments will be shown in previews"
1998 }
1999 ]
2000 },
2001 %{
2002 group: :pleroma,
2003 key: Pleroma.Web.Metadata.Providers.Theme,
2004 type: :group,
2005 description: "Specific provider to hand out themes to instances that scrape index.html",
2006 children: [
2007 %{
2008 key: :theme_color,
2009 type: :string,
2010 description:
2011 "The 'accent color' of the instance, used in places like misskey's instance ticker",
2012 suggestions: ["#593196"]
2013 }
2014 ]
2015 },
2016 %{
2017 group: :pleroma,
2018 key: :rich_media,
2019 type: :group,
2020 description:
2021 "If enabled the instance will parse metadata from attached links to generate link previews",
2022 children: [
2023 %{
2024 key: :enabled,
2025 type: :boolean,
2026 description: "Enables RichMedia parsing of URLs"
2027 },
2028 %{
2029 key: :ignore_hosts,
2030 type: {:list, :string},
2031 description: "List of hosts which will be ignored by the metadata parser",
2032 suggestions: ["accounts.google.com", "xss.website"]
2033 },
2034 %{
2035 key: :ignore_tld,
2036 label: "Ignore TLD",
2037 type: {:list, :string},
2038 description: "List TLDs (top-level domains) which will ignore for parse metadata",
2039 suggestions: ["local", "localdomain", "lan"]
2040 },
2041 %{
2042 key: :parsers,
2043 type: {:list, :module},
2044 description:
2045 "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.",
2046 suggestions: [
2047 Pleroma.Web.RichMedia.Parsers.OEmbed,
2048 Pleroma.Web.RichMedia.Parsers.TwitterCard
2049 ]
2050 },
2051 %{
2052 key: :ttl_setters,
2053 label: "TTL setters",
2054 type: {:list, :module},
2055 description:
2056 "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.",
2057 suggestions: [
2058 Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl
2059 ]
2060 },
2061 %{
2062 key: :failure_backoff,
2063 type: :integer,
2064 description:
2065 "Amount of milliseconds after request failure, during which the request will not be retried.",
2066 suggestions: [60_000]
2067 }
2068 ]
2069 },
2070 %{
2071 group: :pleroma,
2072 key: Pleroma.Formatter,
2073 label: "Linkify",
2074 type: :group,
2075 description:
2076 "Configuration for Pleroma's link formatter which parses mentions, hashtags, and URLs.",
2077 children: [
2078 %{
2079 key: :class,
2080 type: [:string, :boolean],
2081 description: "Specify the class to be added to the generated link. Disable to clear.",
2082 suggestions: ["auto-linker", false]
2083 },
2084 %{
2085 key: :rel,
2086 type: [:string, :boolean],
2087 description: "Override the rel attribute. Disable to clear.",
2088 suggestions: ["ugc", "noopener noreferrer", false]
2089 },
2090 %{
2091 key: :new_window,
2092 type: :boolean,
2093 description: "Link URLs will open in a new window/tab."
2094 },
2095 %{
2096 key: :truncate,
2097 type: [:integer, :boolean],
2098 description:
2099 "Set to a number to truncate URLs longer than the number. Truncated URLs will end in `...`",
2100 suggestions: [15, false]
2101 },
2102 %{
2103 key: :strip_prefix,
2104 type: :boolean,
2105 description: "Strip the scheme prefix."
2106 },
2107 %{
2108 key: :extra,
2109 type: :boolean,
2110 description: "Link URLs with rarely used schemes (magnet, ipfs, irc, etc.)"
2111 },
2112 %{
2113 key: :validate_tld,
2114 type: [:atom, :boolean],
2115 description:
2116 "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)",
2117 suggestions: [:no_scheme, true]
2118 }
2119 ]
2120 },
2121 %{
2122 group: :pleroma,
2123 key: Pleroma.ScheduledActivity,
2124 type: :group,
2125 description: "Scheduled activities settings",
2126 children: [
2127 %{
2128 key: :daily_user_limit,
2129 type: :integer,
2130 description:
2131 "The number of scheduled activities a user is allowed to create in a single day. Default: 25.",
2132 suggestions: [25]
2133 },
2134 %{
2135 key: :total_user_limit,
2136 type: :integer,
2137 description:
2138 "The number of scheduled activities a user is allowed to create in total. Default: 300.",
2139 suggestions: [300]
2140 },
2141 %{
2142 key: :enabled,
2143 type: :boolean,
2144 description: "Whether scheduled activities are sent to the job queue to be executed"
2145 }
2146 ]
2147 },
2148 %{
2149 group: :pleroma,
2150 key: Pleroma.Workers.PurgeExpiredActivity,
2151 type: :group,
2152 description: "Expired activities settings",
2153 children: [
2154 %{
2155 key: :enabled,
2156 type: :boolean,
2157 description: "Enables expired activities addition & deletion"
2158 },
2159 %{
2160 key: :min_lifetime,
2161 type: :integer,
2162 description: "Minimum lifetime for ephemeral activity (in seconds)",
2163 suggestions: [600]
2164 }
2165 ]
2166 },
2167 %{
2168 group: :pleroma,
2169 label: "Pleroma Authenticator",
2170 type: :group,
2171 description: "Authenticator",
2172 children: [
2173 %{
2174 key: Pleroma.Web.Auth.Authenticator,
2175 type: :module,
2176 suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator]
2177 }
2178 ]
2179 },
2180 %{
2181 group: :pleroma,
2182 key: :ldap,
2183 label: "LDAP",
2184 type: :group,
2185 description:
2186 "Use LDAP for user authentication. When a user logs in to the Pleroma instance, the name and password" <>
2187 " will be verified by trying to authenticate (bind) to a LDAP server." <>
2188 " If a user exists in the LDAP directory but there is no account with the same name yet on the" <>
2189 " Pleroma instance then a new Pleroma account will be created with the same name as the LDAP user name.",
2190 children: [
2191 %{
2192 key: :enabled,
2193 type: :boolean,
2194 description: "Enables LDAP authentication"
2195 },
2196 %{
2197 key: :host,
2198 type: :string,
2199 description: "LDAP server hostname",
2200 suggestions: ["localhosts"]
2201 },
2202 %{
2203 key: :port,
2204 type: :integer,
2205 description: "LDAP port, e.g. 389 or 636",
2206 suggestions: [389, 636]
2207 },
2208 %{
2209 key: :ssl,
2210 label: "SSL",
2211 type: :boolean,
2212 description: "Enable to use SSL, usually implies the port 636"
2213 },
2214 %{
2215 key: :sslopts,
2216 label: "SSL options",
2217 type: :keyword,
2218 description: "Additional SSL options",
2219 suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
2220 children: [
2221 %{
2222 key: :cacertfile,
2223 type: :string,
2224 description: "Path to file with PEM encoded cacerts",
2225 suggestions: ["path/to/file/with/PEM/cacerts"]
2226 },
2227 %{
2228 key: :verify,
2229 type: :atom,
2230 description: "Type of cert verification",
2231 suggestions: [:verify_peer]
2232 }
2233 ]
2234 },
2235 %{
2236 key: :tls,
2237 label: "TLS",
2238 type: :boolean,
2239 description: "Enable to use STARTTLS, usually implies the port 389"
2240 },
2241 %{
2242 key: :tlsopts,
2243 label: "TLS options",
2244 type: :keyword,
2245 description: "Additional TLS options",
2246 suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
2247 children: [
2248 %{
2249 key: :cacertfile,
2250 type: :string,
2251 description: "Path to file with PEM encoded cacerts",
2252 suggestions: ["path/to/file/with/PEM/cacerts"]
2253 },
2254 %{
2255 key: :verify,
2256 type: :atom,
2257 description: "Type of cert verification",
2258 suggestions: [:verify_peer]
2259 }
2260 ]
2261 },
2262 %{
2263 key: :base,
2264 type: :string,
2265 description: "LDAP base, e.g. \"dc=example,dc=com\"",
2266 suggestions: ["dc=example,dc=com"]
2267 },
2268 %{
2269 key: :uid,
2270 label: "UID",
2271 type: :string,
2272 description:
2273 "LDAP attribute name to authenticate the user, e.g. when \"cn\", the filter will be \"cn=username,base\"",
2274 suggestions: ["cn"]
2275 }
2276 ]
2277 },
2278 %{
2279 group: :pleroma,
2280 key: :auth,
2281 type: :group,
2282 description: "Authentication / authorization settings",
2283 children: [
2284 %{
2285 key: :enforce_oauth_admin_scope_usage,
2286 label: "Enforce OAuth admin scope usage",
2287 type: :boolean,
2288 description:
2289 "OAuth admin scope requirement toggle. " <>
2290 "If enabled, admin actions explicitly demand admin OAuth scope(s) presence in OAuth token " <>
2291 "(client app must support admin scopes). If disabled and token doesn't have admin scope(s), " <>
2292 "`is_admin` user flag grants access to admin-specific actions."
2293 },
2294 %{
2295 key: :auth_template,
2296 type: :string,
2297 description:
2298 "Authentication form template. By default it's `show.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/show.html.ee`.",
2299 suggestions: ["show.html"]
2300 },
2301 %{
2302 key: :oauth_consumer_template,
2303 label: "OAuth consumer template",
2304 type: :string,
2305 description:
2306 "OAuth consumer mode authentication form template. By default it's `consumer.html` which corresponds to" <>
2307 " `lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex`.",
2308 suggestions: ["consumer.html"]
2309 },
2310 %{
2311 key: :oauth_consumer_strategies,
2312 label: "OAuth consumer strategies",
2313 type: {:list, :string},
2314 description:
2315 "The list of enabled OAuth consumer strategies. By default it's set by OAUTH_CONSUMER_STRATEGIES environment variable." <>
2316 " Each entry in this space-delimited string should be of format \"strategy\" or \"strategy:dependency\"" <>
2317 " (e.g. twitter or keycloak:ueberauth_keycloak_strategy in case dependency is named differently than ueberauth_<strategy>).",
2318 suggestions: ["twitter", "keycloak:ueberauth_keycloak_strategy"]
2319 }
2320 ]
2321 },
2322 %{
2323 group: :pleroma,
2324 key: :email_notifications,
2325 type: :group,
2326 description: "Email notifications settings",
2327 children: [
2328 %{
2329 key: :digest,
2330 type: :map,
2331 description:
2332 "emails of \"what you've missed\" for users who have been inactive for a while",
2333 suggestions: [
2334 %{
2335 active: false,
2336 schedule: "0 0 * * 0",
2337 interval: 7,
2338 inactivity_threshold: 7
2339 }
2340 ],
2341 children: [
2342 %{
2343 key: :active,
2344 label: "Enabled",
2345 type: :boolean,
2346 description: "Globally enable or disable digest emails"
2347 },
2348 %{
2349 key: :schedule,
2350 type: :string,
2351 description:
2352 "When to send digest email, in crontab format. \"0 0 0\" is the default, meaning \"once a week at midnight on Sunday morning\".",
2353 suggestions: ["0 0 * * 0"]
2354 },
2355 %{
2356 key: :interval,
2357 type: :integer,
2358 description: "Minimum interval between digest emails to one user",
2359 suggestions: [7]
2360 },
2361 %{
2362 key: :inactivity_threshold,
2363 type: :integer,
2364 description: "Minimum user inactivity threshold",
2365 suggestions: [7]
2366 }
2367 ]
2368 }
2369 ]
2370 },
2371 %{
2372 group: :pleroma,
2373 key: Pleroma.Emails.UserEmail,
2374 type: :group,
2375 description: "Email template settings",
2376 children: [
2377 %{
2378 key: :logo,
2379 type: {:string, :image},
2380 description: "A path to a custom logo. Set it to `nil` to use the default Pleroma logo.",
2381 suggestions: ["some/path/logo.png"]
2382 },
2383 %{
2384 key: :styling,
2385 type: :map,
2386 description: "A map with color settings for email templates.",
2387 suggestions: [
2388 %{
2389 link_color: "#d8a070",
2390 background_color: "#2C3645",
2391 content_background_color: "#1B2635",
2392 header_color: "#d8a070",
2393 text_color: "#b9b9ba",
2394 text_muted_color: "#b9b9ba"
2395 }
2396 ],
2397 children: [
2398 %{
2399 key: :link_color,
2400 type: :string,
2401 suggestions: ["#d8a070"]
2402 },
2403 %{
2404 key: :background_color,
2405 type: :string,
2406 suggestions: ["#2C3645"]
2407 },
2408 %{
2409 key: :content_background_color,
2410 type: :string,
2411 suggestions: ["#1B2635"]
2412 },
2413 %{
2414 key: :header_color,
2415 type: :string,
2416 suggestions: ["#d8a070"]
2417 },
2418 %{
2419 key: :text_color,
2420 type: :string,
2421 suggestions: ["#b9b9ba"]
2422 },
2423 %{
2424 key: :text_muted_color,
2425 type: :string,
2426 suggestions: ["#b9b9ba"]
2427 }
2428 ]
2429 }
2430 ]
2431 },
2432 %{
2433 group: :pleroma,
2434 key: Pleroma.Emails.NewUsersDigestEmail,
2435 type: :group,
2436 description: "New users admin email digest",
2437 children: [
2438 %{
2439 key: :enabled,
2440 type: :boolean,
2441 description: "Enables new users admin digest email when `true`"
2442 }
2443 ]
2444 },
2445 %{
2446 group: :pleroma,
2447 key: :oauth2,
2448 label: "OAuth2",
2449 type: :group,
2450 description: "Configure OAuth 2 provider capabilities",
2451 children: [
2452 %{
2453 key: :token_expires_in,
2454 type: :integer,
2455 description: "The lifetime in seconds of the access token",
2456 suggestions: [2_592_000]
2457 },
2458 %{
2459 key: :issue_new_refresh_token,
2460 type: :boolean,
2461 description:
2462 "Keeps old refresh token or generate new refresh token when to obtain an access token"
2463 },
2464 %{
2465 key: :clean_expired_tokens,
2466 type: :boolean,
2467 description: "Enable a background job to clean expired OAuth tokens. Default: disabled."
2468 }
2469 ]
2470 },
2471 %{
2472 group: :pleroma,
2473 key: :emoji,
2474 type: :group,
2475 children: [
2476 %{
2477 key: :shortcode_globs,
2478 type: {:list, :string},
2479 description: "Location of custom emoji files. * can be used as a wildcard.",
2480 suggestions: ["/emoji/custom/**/*.png"]
2481 },
2482 %{
2483 key: :pack_extensions,
2484 type: {:list, :string},
2485 description:
2486 "A list of file extensions for emojis, when no emoji.txt for a pack is present",
2487 suggestions: [".png", ".gif"]
2488 },
2489 %{
2490 key: :groups,
2491 type: {:keyword, {:list, :string}},
2492 description:
2493 "Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the group name" <>
2494 " and the value is the location or array of locations. * can be used as a wildcard.",
2495 suggestions: [
2496 Custom: ["/emoji/*.png", "/emoji/**/*.png"]
2497 ]
2498 },
2499 %{
2500 key: :default_manifest,
2501 type: :string,
2502 description:
2503 "Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download." <>
2504 " Currently only one manifest can be added (no arrays).",
2505 suggestions: ["https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json"]
2506 },
2507 %{
2508 key: :shared_pack_cache_seconds_per_file,
2509 label: "Shared pack cache s/file",
2510 type: :integer,
2511 descpiption:
2512 "When an emoji pack is shared, the archive is created and cached in memory" <>
2513 " for this amount of seconds multiplied by the number of files.",
2514 suggestions: [60]
2515 }
2516 ]
2517 },
2518 %{
2519 group: :pleroma,
2520 key: :rate_limit,
2521 type: :group,
2522 description:
2523 "Rate limit settings. This is an advanced feature enabled only for :authentication by default.",
2524 children: [
2525 %{
2526 key: :search,
2527 type: [:tuple, {:list, :tuple}],
2528 description: "For the search requests (account & status search etc.)",
2529 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2530 },
2531 %{
2532 key: :timeline,
2533 type: [:tuple, {:list, :tuple}],
2534 description: "For requests to timelines (each timeline has it's own limiter)",
2535 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2536 },
2537 %{
2538 key: :app_account_creation,
2539 type: [:tuple, {:list, :tuple}],
2540 description: "For registering user accounts from the same IP address",
2541 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2542 },
2543 %{
2544 key: :relations_actions,
2545 type: [:tuple, {:list, :tuple}],
2546 description: "For actions on relationships with all users (follow, unfollow)",
2547 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2548 },
2549 %{
2550 key: :relation_id_action,
2551 label: "Relation ID action",
2552 type: [:tuple, {:list, :tuple}],
2553 description: "For actions on relation with a specific user (follow, unfollow)",
2554 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2555 },
2556 %{
2557 key: :statuses_actions,
2558 type: [:tuple, {:list, :tuple}],
2559 description:
2560 "For create / delete / fav / unfav / reblog / unreblog actions on any statuses",
2561 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2562 },
2563 %{
2564 key: :status_id_action,
2565 label: "Status ID action",
2566 type: [:tuple, {:list, :tuple}],
2567 description:
2568 "For fav / unfav or reblog / unreblog actions on the same status by the same user",
2569 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2570 },
2571 %{
2572 key: :authentication,
2573 type: [:tuple, {:list, :tuple}],
2574 description: "For authentication create / password check / user existence check requests",
2575 suggestions: [{60_000, 15}]
2576 }
2577 ]
2578 },
2579 %{
2580 group: :mime,
2581 label: "Mime Types",
2582 type: :group,
2583 description: "Mime Types settings",
2584 children: [
2585 %{
2586 key: :types,
2587 type: :map,
2588 suggestions: [
2589 %{
2590 "application/xml" => ["xml"],
2591 "application/xrd+xml" => ["xrd+xml"],
2592 "application/jrd+json" => ["jrd+json"],
2593 "application/activity+json" => ["activity+json"],
2594 "application/ld+json" => ["activity+json"]
2595 }
2596 ],
2597 children: [
2598 %{
2599 key: "application/xml",
2600 type: {:list, :string},
2601 suggestions: ["xml"]
2602 },
2603 %{
2604 key: "application/xrd+xml",
2605 type: {:list, :string},
2606 suggestions: ["xrd+xml"]
2607 },
2608 %{
2609 key: "application/jrd+json",
2610 type: {:list, :string},
2611 suggestions: ["jrd+json"]
2612 },
2613 %{
2614 key: "application/activity+json",
2615 type: {:list, :string},
2616 suggestions: ["activity+json"]
2617 },
2618 %{
2619 key: "application/ld+json",
2620 type: {:list, :string},
2621 suggestions: ["activity+json"]
2622 }
2623 ]
2624 }
2625 ]
2626 },
2627 %{
2628 group: :pleroma,
2629 key: :http,
2630 label: "HTTP",
2631 type: :group,
2632 description: "HTTP settings",
2633 children: [
2634 %{
2635 key: :pool_timeout,
2636 label: "HTTP Pool Request Timeout",
2637 type: :integer,
2638 description: "Timeout for initiating HTTP requests (in ms, default 5000)",
2639 suggestions: [5000]
2640 },
2641 %{
2642 key: :receive_timeout,
2643 label: "HTTP Receive Timeout",
2644 type: :integer,
2645 description:
2646 "Timeout for waiting on remote servers to respond to HTTP requests (in ms, default 15000)",
2647 suggestions: [15000]
2648 },
2649 %{
2650 key: :proxy_url,
2651 label: "Proxy URL",
2652 type: :string,
2653 description:
2654 "Proxy URL - of the format http://host:port. Advise setting in .exs instead of admin-fe due to this being set at boot-time.",
2655 suggestions: ["http://localhost:3128"]
2656 },
2657 %{
2658 key: :user_agent,
2659 type: [:string, :atom],
2660 description:
2661 "What user agent to use. Must be a string or an atom `:default`. Default value is `:default`.",
2662 suggestions: ["Pleroma", :default]
2663 },
2664 %{
2665 key: :adapter,
2666 type: :keyword,
2667 description: "Adapter specific options",
2668 suggestions: [],
2669 children: [
2670 %{
2671 key: :ssl_options,
2672 type: :keyword,
2673 label: "SSL Options",
2674 description: "SSL options for HTTP adapter",
2675 children: [
2676 %{
2677 key: :versions,
2678 type: {:list, :atom},
2679 description: "List of TLS version to use",
2680 suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
2681 }
2682 ]
2683 }
2684 ]
2685 }
2686 ]
2687 },
2688 %{
2689 group: :pleroma,
2690 key: :markup,
2691 label: "Markup Settings",
2692 type: :group,
2693 children: [
2694 %{
2695 key: :allow_inline_images,
2696 type: :boolean
2697 },
2698 %{
2699 key: :allow_headings,
2700 type: :boolean
2701 },
2702 %{
2703 key: :allow_tables,
2704 type: :boolean
2705 },
2706 %{
2707 key: :allow_fonts,
2708 type: :boolean
2709 },
2710 %{
2711 key: :scrub_policy,
2712 type: {:list, :module},
2713 description:
2714 "Module names are shortened (removed leading `Pleroma.HTML.` part), but on adding custom module you need to use full name.",
2715 suggestions: [Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]
2716 }
2717 ]
2718 },
2719 %{
2720 group: :pleroma,
2721 key: :user,
2722 type: :group,
2723 children: [
2724 %{
2725 key: :deny_follow_blocked,
2726 type: :boolean
2727 }
2728 ]
2729 },
2730 %{
2731 group: :pleroma,
2732 key: Pleroma.User,
2733 type: :group,
2734 children: [
2735 %{
2736 key: :restricted_nicknames,
2737 type: {:list, :string},
2738 description: "List of nicknames users may not register with.",
2739 suggestions: [
2740 ".well-known",
2741 "~",
2742 "about",
2743 "activities",
2744 "api",
2745 "auth",
2746 "check_password",
2747 "dev",
2748 "friend-requests",
2749 "inbox",
2750 "internal",
2751 "main",
2752 "media",
2753 "nodeinfo",
2754 "notice",
2755 "oauth",
2756 "objects",
2757 "ostatus_subscribe",
2758 "pleroma",
2759 "proxy",
2760 "push",
2761 "registration",
2762 "relay",
2763 "settings",
2764 "status",
2765 "tag",
2766 "user-search",
2767 "user_exists",
2768 "users",
2769 "web"
2770 ]
2771 },
2772 %{
2773 key: :email_blacklist,
2774 type: {:list, :string},
2775 description: "List of email domains users may not register with.",
2776 suggestions: ["mailinator.com", "maildrop.cc"]
2777 }
2778 ]
2779 },
2780 %{
2781 group: :cors_plug,
2782 label: "CORS plug config",
2783 type: :group,
2784 children: [
2785 %{
2786 key: :max_age,
2787 type: :integer,
2788 suggestions: [86_400]
2789 },
2790 %{
2791 key: :methods,
2792 type: {:list, :string},
2793 suggestions: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]
2794 },
2795 %{
2796 key: :expose,
2797 type: {:list, :string},
2798 suggestions: [
2799 "Link",
2800 "X-RateLimit-Reset",
2801 "X-RateLimit-Limit",
2802 "X-RateLimit-Remaining",
2803 "X-Request-Id",
2804 "Idempotency-Key"
2805 ]
2806 },
2807 %{
2808 key: :credentials,
2809 type: :boolean
2810 },
2811 %{
2812 key: :headers,
2813 type: {:list, :string},
2814 suggestions: ["Authorization", "Content-Type", "Idempotency-Key"]
2815 }
2816 ]
2817 },
2818 %{
2819 group: :pleroma,
2820 key: Pleroma.Web.Plugs.RemoteIp,
2821 type: :group,
2822 description: """
2823 `Pleroma.Web.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration.
2824 **If your instance is not behind at least one reverse proxy, you should not enable this plug.**
2825 """,
2826 children: [
2827 %{
2828 key: :enabled,
2829 type: :boolean,
2830 description: "Enable/disable the plug. Default: disabled."
2831 },
2832 %{
2833 key: :headers,
2834 type: {:list, :string},
2835 description: """
2836 A list of strings naming the HTTP headers to use when deriving the true client IP. Default: `["x-forwarded-for"]`.
2837 """
2838 },
2839 %{
2840 key: :proxies,
2841 type: {:list, :string},
2842 description:
2843 "A list of upstream proxy IP subnets in CIDR notation from which we will parse the content of `headers`. Defaults to `[]`. IPv4 entries without a bitmask will be assumed to be /32 and IPv6 /128."
2844 },
2845 %{
2846 key: :reserved,
2847 type: {:list, :string},
2848 description: """
2849 A list of reserved IP subnets in CIDR notation which should be ignored if found in `headers`. Defaults to `["127.0.0.0/8", "::1/128", "fc00::/7", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]`
2850 """
2851 }
2852 ]
2853 },
2854 %{
2855 group: :pleroma,
2856 key: :web_cache_ttl,
2857 label: "Web cache TTL",
2858 type: :group,
2859 description:
2860 "The expiration time for the web responses cache. Values should be in milliseconds or `nil` to disable expiration.",
2861 children: [
2862 %{
2863 key: :activity_pub,
2864 type: :integer,
2865 description:
2866 "Activity pub routes (except question activities). Default: `nil` (no expiration).",
2867 suggestions: [nil]
2868 },
2869 %{
2870 key: :activity_pub_question,
2871 type: :integer,
2872 description: "Activity pub routes (question activities). Default: `30_000` (30 seconds).",
2873 suggestions: [30_000]
2874 }
2875 ]
2876 },
2877 %{
2878 group: :pleroma,
2879 key: :static_fe,
2880 label: "Static FE",
2881 type: :group,
2882 description:
2883 "Render profiles and posts using server-generated HTML that is viewable without using JavaScript",
2884 children: [
2885 %{
2886 key: :enabled,
2887 type: :boolean,
2888 description: "Enables the rendering of static HTML. Default: disabled."
2889 }
2890 ]
2891 },
2892 %{
2893 group: :pleroma,
2894 key: :feed,
2895 type: :group,
2896 description: "Configure feed rendering",
2897 children: [
2898 %{
2899 key: :post_title,
2900 type: :map,
2901 description: "Configure title rendering",
2902 children: [
2903 %{
2904 key: :max_length,
2905 type: :integer,
2906 description: "Maximum number of characters before truncating title",
2907 suggestions: [100]
2908 },
2909 %{
2910 key: :omission,
2911 type: :string,
2912 description: "Replacement which will be used after truncating string",
2913 suggestions: ["..."]
2914 }
2915 ]
2916 }
2917 ]
2918 },
2919 %{
2920 group: :pleroma,
2921 key: :mrf_follow_bot,
2922 tab: :mrf,
2923 related_policy: "Pleroma.Web.ActivityPub.MRF.FollowBotPolicy",
2924 label: "MRF FollowBot Policy",
2925 type: :group,
2926 description: "Automatically follows newly discovered accounts.",
2927 children: [
2928 %{
2929 key: :follower_nickname,
2930 type: :string,
2931 description: "The name of the bot account to use for following newly discovered users.",
2932 suggestions: ["followbot"]
2933 }
2934 ]
2935 },
2936 %{
2937 group: :pleroma,
2938 key: :modules,
2939 type: :group,
2940 description: "Custom Runtime Modules",
2941 children: [
2942 %{
2943 key: :runtime_dir,
2944 type: :string,
2945 description: "A path to custom Elixir modules (such as MRF policies)."
2946 }
2947 ]
2948 },
2949 %{
2950 group: :pleroma,
2951 key: :streamer,
2952 type: :group,
2953 description: "Settings for notifications streamer",
2954 children: [
2955 %{
2956 key: :workers,
2957 type: :integer,
2958 description: "Number of workers to send notifications",
2959 suggestions: [3]
2960 },
2961 %{
2962 key: :overflow_workers,
2963 type: :integer,
2964 description: "Maximum number of workers created if pool is empty",
2965 suggestions: [2]
2966 }
2967 ]
2968 },
2969 %{
2970 group: :pleroma,
2971 key: :restrict_unauthenticated,
2972 label: "Restrict Unauthenticated",
2973 type: :group,
2974 description: "Disallow unauthenticated viewing of timelines, user profiles and statuses.",
2975 children: [
2976 %{
2977 key: :timelines,
2978 type: :map,
2979 description: "Settings for public and federated timelines.",
2980 children: [
2981 %{
2982 key: :local,
2983 type: :boolean,
2984 description: "Disallow viewing the public timeline."
2985 },
2986 %{
2987 key: :federated,
2988 type: :boolean,
2989 description: "Disallow viewing the whole known network timeline."
2990 }
2991 ]
2992 },
2993 %{
2994 key: :profiles,
2995 type: :map,
2996 description: "Settings for user profiles.",
2997 children: [
2998 %{
2999 key: :local,
3000 type: :boolean,
3001 description: "Disallow viewing local user profiles."
3002 },
3003 %{
3004 key: :remote,
3005 type: :boolean,
3006 description: "Disallow viewing remote user profiles."
3007 }
3008 ]
3009 },
3010 %{
3011 key: :activities,
3012 type: :map,
3013 description: "Settings for posts.",
3014 children: [
3015 %{
3016 key: :local,
3017 type: :boolean,
3018 description: "Disallow viewing local posts."
3019 },
3020 %{
3021 key: :remote,
3022 type: :boolean,
3023 description: "Disallow viewing remote posts."
3024 }
3025 ]
3026 }
3027 ]
3028 },
3029 %{
3030 group: :pleroma,
3031 key: Pleroma.Web.ApiSpec.CastAndValidate,
3032 type: :group,
3033 children: [
3034 %{
3035 key: :strict,
3036 type: :boolean,
3037 description:
3038 "Enables strict input validation (useful in development, not recommended in production)"
3039 }
3040 ]
3041 },
3042 %{
3043 group: :pleroma,
3044 key: :instances_favicons,
3045 type: :group,
3046 description: "Control favicons for instances",
3047 children: [
3048 %{
3049 key: :enabled,
3050 type: :boolean,
3051 description: "Allow/disallow displaying and getting instances favicons"
3052 }
3053 ]
3054 },
3055 %{
3056 group: :pleroma,
3057 key: :instances_nodeinfo,
3058 type: :group,
3059 description: "Control favicons for instances",
3060 children: [
3061 %{
3062 key: :enabled,
3063 type: :boolean,
3064 description: "Allow/disallow getting instance nodeinfo"
3065 }
3066 ]
3067 },
3068 %{
3069 group: :ex_aws,
3070 key: :s3,
3071 type: :group,
3072 descriptions: "S3 service related settings",
3073 children: [
3074 %{
3075 key: :access_key_id,
3076 type: :string,
3077 description: "S3 access key ID",
3078 suggestions: ["AKIAQ8UKHTGIYN7DMWWJ"]
3079 },
3080 %{
3081 key: :secret_access_key,
3082 type: :string,
3083 description: "Secret access key",
3084 suggestions: ["JFGt+fgH1UQ7vLUQjpW+WvjTdV/UNzVxcwn7DkaeFKtBS5LvoXvIiME4NQBsT6ZZ"]
3085 },
3086 %{
3087 key: :host,
3088 type: :string,
3089 description: "S3 host",
3090 suggestions: ["s3.eu-central-1.amazonaws.com"]
3091 },
3092 %{
3093 key: :region,
3094 type: :string,
3095 description: "S3 region (for AWS)",
3096 suggestions: ["us-east-1"]
3097 }
3098 ]
3099 },
3100 %{
3101 group: :pleroma,
3102 key: :frontends,
3103 type: :group,
3104 description: "Installed frontends management",
3105 children: [
3106 %{
3107 key: :primary,
3108 type: :map,
3109 description: "Primary frontend, the one that is served for all pages by default",
3110 children: installed_frontend_options
3111 },
3112 %{
3113 key: :admin,
3114 type: :map,
3115 description: "Admin frontend",
3116 children: installed_frontend_options
3117 },
3118 %{
3119 key: :mastodon,
3120 type: :map,
3121 description: "Mastodon frontend",
3122 children: installed_frontend_options
3123 },
3124 %{
3125 key: :swagger,
3126 type: :map,
3127 description: "Swagger API reference frontend",
3128 children:
3129 installed_frontend_options ++
3130 [
3131 %{
3132 key: "enabled",
3133 label: "Enabled",
3134 type: :boolean,
3135 description: "Whether to have this enabled at all"
3136 }
3137 ]
3138 },
3139 %{
3140 key: :available,
3141 type: :map,
3142 description:
3143 "A map containing available frontends and parameters for their installation.",
3144 children: frontend_options
3145 }
3146 ]
3147 },
3148 %{
3149 group: :pleroma,
3150 key: Pleroma.Web.Preload,
3151 type: :group,
3152 description: "Preload-related settings",
3153 children: [
3154 %{
3155 key: :providers,
3156 type: {:list, :module},
3157 description: "List of preload providers to enable",
3158 suggestions: [
3159 Pleroma.Web.Preload.Providers.Instance,
3160 Pleroma.Web.Preload.Providers.User,
3161 Pleroma.Web.Preload.Providers.Timelines,
3162 Pleroma.Web.Preload.Providers.StatusNet
3163 ]
3164 }
3165 ]
3166 },
3167 %{
3168 group: :pleroma,
3169 key: :majic_pool,
3170 type: :group,
3171 description: "Majic/libmagic configuration",
3172 children: [
3173 %{
3174 key: :size,
3175 type: :integer,
3176 description: "Number of majic workers to start.",
3177 suggestions: [2]
3178 }
3179 ]
3180 },
3181 %{
3182 group: :pleroma,
3183 key: Pleroma.User.Backup,
3184 type: :group,
3185 description: "Account Backup",
3186 children: [
3187 %{
3188 key: :purge_after_days,
3189 type: :integer,
3190 description: "Remove backup achives after N days",
3191 suggestions: [30]
3192 },
3193 %{
3194 key: :limit_days,
3195 type: :integer,
3196 description: "Limit user to export not more often than once per N days",
3197 suggestions: [7]
3198 }
3199 ]
3200 },
3201 %{
3202 group: :pleroma,
3203 key: ConcurrentLimiter,
3204 type: :group,
3205 description: "Limits configuration for background tasks.",
3206 children: [
3207 %{
3208 key: Pleroma.Web.RichMedia.Helpers,
3209 type: :keyword,
3210 description: "Concurrent limits configuration for getting RichMedia for activities.",
3211 suggestions: [max_running: 5, max_waiting: 5],
3212 children: [
3213 %{
3214 key: :max_running,
3215 type: :integer,
3216 description: "Max running concurrently jobs.",
3217 suggestion: [5]
3218 },
3219 %{
3220 key: :max_waiting,
3221 type: :integer,
3222 description: "Max waiting jobs.",
3223 suggestion: [5]
3224 }
3225 ]
3226 },
3227 %{
3228 key: Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy,
3229 type: :keyword,
3230 description: "Concurrent limits configuration for MediaProxyWarmingPolicy.",
3231 suggestions: [max_running: 5, max_waiting: 5],
3232 children: [
3233 %{
3234 key: :max_running,
3235 type: :integer,
3236 description: "Max running concurrently jobs.",
3237 suggestion: [5]
3238 },
3239 %{
3240 key: :max_waiting,
3241 type: :integer,
3242 description: "Max waiting jobs.",
3243 suggestion: [5]
3244 }
3245 ]
3246 }
3247 ]
3248 },
3249 %{
3250 group: :pleroma,
3251 key: Pleroma.Search,
3252 type: :group,
3253 label: "Search",
3254 description: "General search settings.",
3255 children: [
3256 %{
3257 key: :module,
3258 type: :module,
3259 description: "Selected search module.",
3260 suggestions: {:list_behaviour_implementations, Pleroma.Search.SearchBackend}
3261 }
3262 ]
3263 },
3264 %{
3265 group: :pleroma,
3266 key: Pleroma.Search.Meilisearch,
3267 type: :group,
3268 description: "Meilisearch settings.",
3269 children: [
3270 %{
3271 key: :url,
3272 type: :string,
3273 description: "Meilisearch URL.",
3274 suggestion: ["http://127.0.0.1:7700/"]
3275 },
3276 %{
3277 key: :private_key,
3278 type: :string,
3279 description:
3280 "Private key for meilisearch authentication, or `nil` to disable private key authentication.",
3281 suggestion: [nil]
3282 },
3283 %{
3284 key: :initial_indexing_chunk_size,
3285 type: :integer,
3286 description:
3287 "Amount of posts in a batch when running the initial indexing operation. Should probably not be more than 100000" <>
3288 " since there's a limit on maximum insert size",
3289 suggestion: [100_000]
3290 }
3291 ]
3292 },
3293 %{
3294 group: :pleroma,
3295 key: Pleroma.Search.Elasticsearch.Cluster,
3296 label: "Elasticsearch",
3297 type: :group,
3298 description: "Elasticsearch settings.",
3299 children: [
3300 %{
3301 key: :url,
3302 type: :string,
3303 description: "Elasticsearch URL.",
3304 suggestion: ["http://127.0.0.1:9200/"]
3305 },
3306 %{
3307 key: :username,
3308 type: :string,
3309 description: "Username to connect to ES. Set to nil if your cluster is unauthenticated.",
3310 suggestion: ["elastic"]
3311 },
3312 %{
3313 key: :password,
3314 type: :string,
3315 description: "Password to connect to ES. Set to nil if your cluster is unauthenticated.",
3316 suggestion: ["changeme"]
3317 },
3318 %{
3319 key: :api,
3320 type: :module,
3321 description:
3322 "The API module used by Elasticsearch. Should always be Elasticsearch.API.HTTP",
3323 suggestion: [Elasticsearch.API.HTTP]
3324 },
3325 %{
3326 key: :json_library,
3327 type: :module,
3328 description:
3329 "The JSON module used to encode/decode when communicating with Elasticsearch",
3330 suggestion: [Jason]
3331 },
3332 %{
3333 key: :indexes,
3334 type: :map,
3335 description: "The indices to set up in Elasticsearch",
3336 children: [
3337 %{
3338 key: :activities,
3339 type: :map,
3340 description: "Config for the index to use for activities",
3341 children: [
3342 %{
3343 key: :settings,
3344 type: :string,
3345 description:
3346 "Path to the file containing index settings for the activities index. Should contain a mapping.",
3347 suggestion: ["priv/es-mappings/activity.json"]
3348 },
3349 %{
3350 key: :store,
3351 type: :module,
3352 description: "The internal store module",
3353 suggestion: [Pleroma.Search.Elasticsearch.Store]
3354 },
3355 %{
3356 key: :sources,
3357 type: {:list, :module},
3358 description: "The internal types to use for this index",
3359 suggestion: [[Pleroma.Activity]]
3360 },
3361 %{
3362 key: :bulk_page_size,
3363 type: :integer,
3364 description: "Size for bulk put requests, mostly used on building the index",
3365 suggestion: [5000]
3366 },
3367 %{
3368 key: :bulk_wait_interval,
3369 type: :integer,
3370 description: "Time to wait between bulk put requests (in ms)",
3371 suggestion: [15_000]
3372 }
3373 ]
3374 }
3375 ]
3376 }
3377 ]
3378 },
3379 %{
3380 group: :pleroma,
3381 key: :translator,
3382 type: :group,
3383 description: "Translation Settings",
3384 children: [
3385 %{
3386 key: :enabled,
3387 type: :boolean,
3388 description: "Is translation enabled?",
3389 suggestion: [true, false]
3390 },
3391 %{
3392 key: :module,
3393 type: :module,
3394 description: "Translation module.",
3395 suggestions: {:list_behaviour_implementations, Pleroma.Akkoma.Translator}
3396 }
3397 ]
3398 },
3399 %{
3400 group: :pleroma,
3401 key: :deepl,
3402 label: "DeepL",
3403 type: :group,
3404 description: "DeepL Settings.",
3405 children: [
3406 %{
3407 key: :tier,
3408 type: {:dropdown, :atom},
3409 description: "API Tier",
3410 suggestions: [:free, :pro]
3411 },
3412 %{
3413 key: :api_key,
3414 type: :string,
3415 description: "API key for DeepL",
3416 suggestions: [nil]
3417 }
3418 ]
3419 },
3420 %{
3421 group: :pleroma,
3422 key: :libre_translate,
3423 type: :group,
3424 description: "LibreTranslate Settings.",
3425 children: [
3426 %{
3427 key: :url,
3428 type: :string,
3429 description: "URL for libretranslate",
3430 suggestion: [nil]
3431 },
3432 %{
3433 key: :api_key,
3434 type: :string,
3435 description: "API key for libretranslate",
3436 suggestion: [nil]
3437 }
3438 ]
3439 }
3440 ]