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