1fb0c3c41afaf5da592f4800a30d9c46d103c1c2
[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 tab: :mrf,
1387 label: "MRF simple",
1388 type: :group,
1389 description: "Message Rewrite Facility",
1390 children: [
1391 %{
1392 key: :media_removal,
1393 type: {:list, :string},
1394 description: "List of instances to strip media attachments from",
1395 suggestions: ["example.com", "*.example.com"]
1396 },
1397 %{
1398 key: :media_nsfw,
1399 label: "Media NSFW",
1400 type: {:list, :string},
1401 description: "List of instances to tag all media as NSFW (sensitive) from",
1402 suggestions: ["example.com", "*.example.com"]
1403 },
1404 %{
1405 key: :federated_timeline_removal,
1406 type: {:list, :string},
1407 description:
1408 "List of instances to remove from Federated (aka The Whole Known Network) Timeline",
1409 suggestions: ["example.com", "*.example.com"]
1410 },
1411 %{
1412 key: :reject,
1413 type: {:list, :string},
1414 description: "List of instances to reject activities from (except deletes)",
1415 suggestions: ["example.com", "*.example.com"]
1416 },
1417 %{
1418 key: :accept,
1419 type: {:list, :string},
1420 description: "List of instances to only accept activities from (except deletes)",
1421 suggestions: ["example.com", "*.example.com"]
1422 },
1423 %{
1424 key: :report_removal,
1425 type: {:list, :string},
1426 description: "List of instances to reject reports from",
1427 suggestions: ["example.com", "*.example.com"]
1428 },
1429 %{
1430 key: :avatar_removal,
1431 type: {:list, :string},
1432 description: "List of instances to strip avatars from",
1433 suggestions: ["example.com", "*.example.com"]
1434 },
1435 %{
1436 key: :banner_removal,
1437 type: {:list, :string},
1438 description: "List of instances to strip banners from",
1439 suggestions: ["example.com", "*.example.com"]
1440 },
1441 %{
1442 key: :reject_deletes,
1443 type: {:list, :string},
1444 description: "List of instances to reject deletions from",
1445 suggestions: ["example.com", "*.example.com"]
1446 }
1447 ]
1448 },
1449 %{
1450 group: :pleroma,
1451 key: :mrf_activity_expiration,
1452 tab: :mrf,
1453 label: "MRF Activity Expiration Policy",
1454 type: :group,
1455 description: "Adds expiration to all local Create Note activities",
1456 children: [
1457 %{
1458 key: :days,
1459 type: :integer,
1460 description: "Default global expiration time for all local Create activities (in days)",
1461 suggestions: [90, 365]
1462 }
1463 ]
1464 },
1465 %{
1466 group: :pleroma,
1467 key: :mrf_subchain,
1468 tab: :mrf,
1469 label: "MRF subchain",
1470 type: :group,
1471 description:
1472 "This policy processes messages through an alternate pipeline when a given message matches certain criteria." <>
1473 " All criteria are configured as a map of regular expressions to lists of policy modules.",
1474 children: [
1475 %{
1476 key: :match_actor,
1477 type: :map,
1478 description: "Matches a series of regular expressions against the actor field",
1479 suggestions: [
1480 %{
1481 ~r/https:\/\/example.com/s => [Pleroma.Web.ActivityPub.MRF.DropPolicy]
1482 }
1483 ]
1484 }
1485 ]
1486 },
1487 %{
1488 group: :pleroma,
1489 key: :mrf_rejectnonpublic,
1490 tab: :mrf,
1491 description:
1492 "MRF RejectNonPublic settings. RejectNonPublic drops posts with non-public visibility settings.",
1493 label: "MRF reject non public",
1494 type: :group,
1495 children: [
1496 %{
1497 key: :allow_followersonly,
1498 label: "Allow followers-only",
1499 type: :boolean,
1500 description: "Whether to allow followers-only posts"
1501 },
1502 %{
1503 key: :allow_direct,
1504 type: :boolean,
1505 description: "Whether to allow direct messages"
1506 }
1507 ]
1508 },
1509 %{
1510 group: :pleroma,
1511 key: :mrf_hellthread,
1512 tab: :mrf,
1513 label: "MRF hellthread",
1514 type: :group,
1515 description: "Block messages with too much mentions",
1516 children: [
1517 %{
1518 key: :delist_threshold,
1519 type: :integer,
1520 description:
1521 "Number of mentioned users after which the message gets delisted (the message can still be seen, " <>
1522 " but it will not show up in public timelines and mentioned users won't get notifications about it). Set to 0 to disable.",
1523 suggestions: [10]
1524 },
1525 %{
1526 key: :reject_threshold,
1527 type: :integer,
1528 description:
1529 "Number of mentioned users after which the messaged gets rejected. Set to 0 to disable.",
1530 suggestions: [20]
1531 }
1532 ]
1533 },
1534 %{
1535 group: :pleroma,
1536 key: :mrf_keyword,
1537 tab: :mrf,
1538 label: "MRF keyword",
1539 type: :group,
1540 description: "Reject or Word-Replace messages with a keyword or regex",
1541 children: [
1542 %{
1543 key: :reject,
1544 type: [:string, :regex],
1545 description:
1546 "A list of patterns which result in message being rejected. Each pattern can be a string or a regular expression.",
1547 suggestions: ["foo", ~r/foo/iu]
1548 },
1549 %{
1550 key: :federated_timeline_removal,
1551 type: [:string, :regex],
1552 description:
1553 "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.",
1554 suggestions: ["foo", ~r/foo/iu]
1555 },
1556 %{
1557 key: :replace,
1558 type: [{:tuple, :string, :string}, {:tuple, :regex, :string}],
1559 description:
1560 "A list of tuples containing {pattern, replacement}. Each pattern can be a string or a regular expression.",
1561 suggestions: [{"foo", "bar"}, {~r/foo/iu, "bar"}]
1562 }
1563 ]
1564 },
1565 %{
1566 group: :pleroma,
1567 key: :mrf_mention,
1568 label: "MRF mention",
1569 type: :group,
1570 description: "Block messages which mention a user",
1571 children: [
1572 %{
1573 key: :actors,
1574 type: {:list, :string},
1575 description: "A list of actors for which any post mentioning them will be dropped.",
1576 suggestions: ["actor1", "actor2"]
1577 }
1578 ]
1579 },
1580 %{
1581 group: :pleroma,
1582 key: :mrf_vocabulary,
1583 tab: :mrf,
1584 label: "MRF vocabulary",
1585 type: :group,
1586 description: "Filter messages which belong to certain activity vocabularies",
1587 children: [
1588 %{
1589 key: :accept,
1590 type: {:list, :string},
1591 description:
1592 "A list of ActivityStreams terms to accept. If empty, all supported messages are accepted",
1593 suggestions: ["Create", "Follow", "Mention", "Announce", "Like"]
1594 },
1595 %{
1596 key: :reject,
1597 type: {:list, :string},
1598 description:
1599 "A list of ActivityStreams terms to reject. If empty, no messages are rejected",
1600 suggestions: ["Create", "Follow", "Mention", "Announce", "Like"]
1601 }
1602 ]
1603 },
1604 # %{
1605 # group: :pleroma,
1606 # key: :mrf_user_allowlist,
1607 # type: :map,
1608 # description:
1609 # "The keys in this section are the domain names that the policy should apply to." <>
1610 # " Each key should be assigned a list of users that should be allowed through by their ActivityPub ID",
1611 # suggestions: [
1612 # %{"example.org" => ["https://example.org/users/admin"]}
1613 # ]
1614 # ]
1615 # },
1616 %{
1617 group: :pleroma,
1618 key: :media_proxy,
1619 type: :group,
1620 description: "Media proxy",
1621 children: [
1622 %{
1623 key: :enabled,
1624 type: :boolean,
1625 description: "Enables proxying of remote media to the instance's proxy"
1626 },
1627 %{
1628 key: :base_url,
1629 type: :string,
1630 description:
1631 "The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts.",
1632 suggestions: ["https://example.com"]
1633 },
1634 %{
1635 key: :invalidation,
1636 type: :keyword,
1637 descpiption: "",
1638 suggestions: [
1639 enabled: true,
1640 provider: Pleroma.Web.MediaProxy.Invalidation.Script
1641 ],
1642 children: [
1643 %{
1644 key: :enabled,
1645 type: :boolean,
1646 description: "Enables invalidate media cache"
1647 },
1648 %{
1649 key: :provider,
1650 type: :module,
1651 description: "Module which will be used to cache purge.",
1652 suggestions: [
1653 Pleroma.Web.MediaProxy.Invalidation.Script,
1654 Pleroma.Web.MediaProxy.Invalidation.Http
1655 ]
1656 }
1657 ]
1658 },
1659 %{
1660 key: :proxy_opts,
1661 type: :keyword,
1662 description: "Options for Pleroma.ReverseProxy",
1663 suggestions: [
1664 redirect_on_failure: false,
1665 max_body_length: 25 * 1_048_576,
1666 http: [
1667 follow_redirect: true,
1668 pool: :media
1669 ]
1670 ],
1671 children: [
1672 %{
1673 key: :redirect_on_failure,
1674 type: :boolean,
1675 description:
1676 "Redirects the client to the real remote URL if there's any HTTP errors. " <>
1677 "Any error during body processing will not be redirected as the response is chunked."
1678 },
1679 %{
1680 key: :max_body_length,
1681 type: :integer,
1682 description:
1683 "Limits the content length to be approximately the " <>
1684 "specified length. It is validated with the `content-length` header and also verified when proxying."
1685 },
1686 %{
1687 key: :http,
1688 type: :keyword,
1689 description: "HTTP options",
1690 children: [
1691 %{
1692 key: :adapter,
1693 type: :keyword,
1694 description: "Adapter specific options",
1695 children: [
1696 %{
1697 key: :ssl_options,
1698 type: :keyword,
1699 label: "SSL Options",
1700 description: "SSL options for HTTP adapter",
1701 children: [
1702 %{
1703 key: :versions,
1704 type: {:list, :atom},
1705 description: "List of TLS version to use",
1706 suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
1707 }
1708 ]
1709 }
1710 ]
1711 },
1712 %{
1713 key: :proxy_url,
1714 label: "Proxy URL",
1715 type: [:string, :tuple],
1716 description: "Proxy URL",
1717 suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}]
1718 }
1719 ]
1720 }
1721 ]
1722 },
1723 %{
1724 key: :whitelist,
1725 type: {:list, :string},
1726 description: "List of domains to bypass the mediaproxy",
1727 suggestions: ["example.com"]
1728 }
1729 ]
1730 },
1731 %{
1732 group: :pleroma,
1733 key: Pleroma.Web.MediaProxy.Invalidation.Http,
1734 type: :group,
1735 description: "HTTP invalidate settings",
1736 children: [
1737 %{
1738 key: :method,
1739 type: :atom,
1740 description: "HTTP method of request. Default: :purge"
1741 },
1742 %{
1743 key: :headers,
1744 type: {:list, :tuple},
1745 description: "HTTP headers of request.",
1746 suggestions: [{"x-refresh", 1}]
1747 },
1748 %{
1749 key: :options,
1750 type: :keyword,
1751 description: "Request options.",
1752 suggestions: [params: %{ts: "xxx"}]
1753 }
1754 ]
1755 },
1756 %{
1757 group: :pleroma,
1758 key: Pleroma.Web.MediaProxy.Invalidation.Script,
1759 type: :group,
1760 description: "Script invalidate settings",
1761 children: [
1762 %{
1763 key: :script_path,
1764 type: :string,
1765 description: "Path to shell script. Which will run purge cache.",
1766 suggestions: ["./installation/nginx-cache-purge.sh.example"]
1767 }
1768 ]
1769 },
1770 %{
1771 group: :pleroma,
1772 key: :gopher,
1773 type: :group,
1774 description: "Gopher settings",
1775 children: [
1776 %{
1777 key: :enabled,
1778 type: :boolean,
1779 description: "Enables the gopher interface"
1780 },
1781 %{
1782 key: :ip,
1783 type: :tuple,
1784 description: "IP address to bind to",
1785 suggestions: [{0, 0, 0, 0}]
1786 },
1787 %{
1788 key: :port,
1789 type: :integer,
1790 description: "Port to bind to",
1791 suggestions: [9999]
1792 },
1793 %{
1794 key: :dstport,
1795 type: :integer,
1796 description: "Port advertised in urls (optional, defaults to port)",
1797 suggestions: [9999]
1798 }
1799 ]
1800 },
1801 %{
1802 group: :pleroma,
1803 key: :activitypub,
1804 type: :group,
1805 description: "ActivityPub-related settings",
1806 children: [
1807 %{
1808 key: :unfollow_blocked,
1809 type: :boolean,
1810 description: "Whether blocks result in people getting unfollowed"
1811 },
1812 %{
1813 key: :outgoing_blocks,
1814 type: :boolean,
1815 description: "Whether to federate blocks to other instances"
1816 },
1817 %{
1818 key: :sign_object_fetches,
1819 type: :boolean,
1820 description: "Sign object fetches with HTTP signatures"
1821 },
1822 %{
1823 key: :note_replies_output_limit,
1824 type: :integer,
1825 description:
1826 "The number of Note replies' URIs to be included with outgoing federation (`5` to match Mastodon hardcoded value, `0` to disable the output)."
1827 },
1828 %{
1829 key: :follow_handshake_timeout,
1830 type: :integer,
1831 description: "Following handshake timeout",
1832 suggestions: [500]
1833 }
1834 ]
1835 },
1836 %{
1837 group: :pleroma,
1838 key: :http_security,
1839 type: :group,
1840 description: "HTTP security settings",
1841 children: [
1842 %{
1843 key: :enabled,
1844 type: :boolean,
1845 description: "Whether the managed content security policy is enabled"
1846 },
1847 %{
1848 key: :sts,
1849 label: "STS",
1850 type: :boolean,
1851 description: "Whether to additionally send a Strict-Transport-Security header"
1852 },
1853 %{
1854 key: :sts_max_age,
1855 label: "STS max age",
1856 type: :integer,
1857 description: "The maximum age for the Strict-Transport-Security header if sent",
1858 suggestions: [31_536_000]
1859 },
1860 %{
1861 key: :ct_max_age,
1862 label: "CT max age",
1863 type: :integer,
1864 description: "The maximum age for the Expect-CT header if sent",
1865 suggestions: [2_592_000]
1866 },
1867 %{
1868 key: :referrer_policy,
1869 type: :string,
1870 description: "The referrer policy to use, either \"same-origin\" or \"no-referrer\"",
1871 suggestions: ["same-origin", "no-referrer"]
1872 },
1873 %{
1874 key: :report_uri,
1875 label: "Report URI",
1876 type: :string,
1877 description: "Adds the specified url to report-uri and report-to group in CSP header",
1878 suggestions: ["https://example.com/report-uri"]
1879 }
1880 ]
1881 },
1882 %{
1883 group: :web_push_encryption,
1884 key: :vapid_details,
1885 type: :group,
1886 description:
1887 "Web Push Notifications configuration. You can use the mix task mix web_push.gen.keypair to generate it",
1888 children: [
1889 %{
1890 key: :subject,
1891 type: :string,
1892 description:
1893 "A mailto link for the administrative contact." <>
1894 " It's best if this email is not a personal email address, but rather a group email to the instance moderation team.",
1895 suggestions: ["mailto:moderators@pleroma.com"]
1896 },
1897 %{
1898 key: :public_key,
1899 type: :string,
1900 description: "VAPID public key",
1901 suggestions: ["Public key"]
1902 },
1903 %{
1904 key: :private_key,
1905 type: :string,
1906 description: "VAPID private key",
1907 suggestions: ["Private key"]
1908 }
1909 ]
1910 },
1911 %{
1912 group: :pleroma,
1913 key: Pleroma.Captcha,
1914 type: :group,
1915 description: "Captcha-related settings",
1916 children: [
1917 %{
1918 key: :enabled,
1919 type: :boolean,
1920 description: "Whether the captcha should be shown on registration"
1921 },
1922 %{
1923 key: :method,
1924 type: :module,
1925 description: "The method/service to use for captcha",
1926 suggestions: [Pleroma.Captcha.Kocaptcha, Pleroma.Captcha.Native]
1927 },
1928 %{
1929 key: :seconds_valid,
1930 type: :integer,
1931 description: "The time in seconds for which the captcha is valid",
1932 suggestions: [60]
1933 }
1934 ]
1935 },
1936 %{
1937 group: :pleroma,
1938 key: Pleroma.Captcha.Kocaptcha,
1939 type: :group,
1940 description:
1941 "Kocaptcha is a very simple captcha service with a single API endpoint, the source code is" <>
1942 " here: https://github.com/koto-bank/kocaptcha. The default endpoint (https://captcha.kotobank.ch) is hosted by the developer.",
1943 children: [
1944 %{
1945 key: :endpoint,
1946 type: :string,
1947 description: "The kocaptcha endpoint to use",
1948 suggestions: ["https://captcha.kotobank.ch"]
1949 }
1950 ]
1951 },
1952 %{
1953 group: :pleroma,
1954 type: :group,
1955 description:
1956 "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",
1957 children: [
1958 %{
1959 key: :admin_token,
1960 type: :string,
1961 description: "Token",
1962 suggestions: ["We recommend a secure random string or UUID"]
1963 }
1964 ]
1965 },
1966 %{
1967 group: :pleroma,
1968 key: Oban,
1969 type: :group,
1970 description: """
1971 [Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.
1972
1973 Note: if you are running PostgreSQL in [`silent_mode`](https://postgresqlco.nf/en/doc/param/silent_mode?version=9.1),
1974 it's advised to set [`log_destination`](https://postgresqlco.nf/en/doc/param/log_destination?version=9.1) to `syslog`,
1975 otherwise `postmaster.log` file may grow because of "you don't own a lock of type ShareLock" warnings
1976 (see https://github.com/sorentwo/oban/issues/52).
1977 """,
1978 children: [
1979 %{
1980 key: :verbose,
1981 type: {:dropdown, :atom},
1982 description: "Logs verbose mode",
1983 suggestions: [false, :error, :warn, :info, :debug]
1984 },
1985 %{
1986 key: :prune,
1987 type: [:atom, :tuple],
1988 description:
1989 "Non-retryable jobs [pruning settings](https://github.com/sorentwo/oban#pruning)",
1990 suggestions: [:disabled, {:maxlen, 1500}, {:maxage, 60 * 60}]
1991 },
1992 %{
1993 key: :queues,
1994 type: {:keyword, :integer},
1995 description:
1996 "Background jobs queues (keys: queues, values: max numbers of concurrent jobs)",
1997 suggestions: [
1998 activity_expiration: 10,
1999 attachments_cleanup: 5,
2000 background: 5,
2001 federator_incoming: 50,
2002 federator_outgoing: 50,
2003 mailer: 10,
2004 scheduled_activities: 10,
2005 transmogrifier: 20,
2006 web_push: 50
2007 ],
2008 children: [
2009 %{
2010 key: :activity_expiration,
2011 type: :integer,
2012 description: "Activity expiration queue",
2013 suggestions: [10]
2014 },
2015 %{
2016 key: :attachments_cleanup,
2017 type: :integer,
2018 description: "Attachment deletion queue",
2019 suggestions: [5]
2020 },
2021 %{
2022 key: :background,
2023 type: :integer,
2024 description: "Background queue",
2025 suggestions: [5]
2026 },
2027 %{
2028 key: :federator_incoming,
2029 type: :integer,
2030 description: "Incoming federation queue",
2031 suggestions: [50]
2032 },
2033 %{
2034 key: :federator_outgoing,
2035 type: :integer,
2036 description: "Outgoing federation queue",
2037 suggestions: [50]
2038 },
2039 %{
2040 key: :mailer,
2041 type: :integer,
2042 description: "Email sender queue, see Pleroma.Emails.Mailer",
2043 suggestions: [10]
2044 },
2045 %{
2046 key: :scheduled_activities,
2047 type: :integer,
2048 description: "Scheduled activities queue, see Pleroma.ScheduledActivities",
2049 suggestions: [10]
2050 },
2051 %{
2052 key: :transmogrifier,
2053 type: :integer,
2054 description: "Transmogrifier queue",
2055 suggestions: [20]
2056 },
2057 %{
2058 key: :web_push,
2059 type: :integer,
2060 description: "Web push notifications queue",
2061 suggestions: [50]
2062 }
2063 ]
2064 },
2065 %{
2066 key: :crontab,
2067 type: {:list, :tuple},
2068 description: "Settings for cron background jobs",
2069 suggestions: [
2070 {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker},
2071 {"0 * * * *", Pleroma.Workers.Cron.StatsWorker},
2072 {"* * * * *", Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker},
2073 {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
2074 {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
2075 ]
2076 }
2077 ]
2078 },
2079 %{
2080 group: :pleroma,
2081 key: :workers,
2082 type: :group,
2083 description: "Includes custom worker options not interpretable directly by `Oban`",
2084 children: [
2085 %{
2086 key: :retries,
2087 type: {:keyword, :integer},
2088 description: "Max retry attempts for failed jobs, per `Oban` queue",
2089 suggestions: [
2090 federator_incoming: 5,
2091 federator_outgoing: 5
2092 ]
2093 }
2094 ]
2095 },
2096 %{
2097 group: :pleroma,
2098 key: Pleroma.Web.Metadata,
2099 type: :group,
2100 description: "Metadata-related settings",
2101 children: [
2102 %{
2103 key: :providers,
2104 type: {:list, :module},
2105 description: "List of metadata providers to enable",
2106 suggestions: [
2107 Pleroma.Web.Metadata.Providers.OpenGraph,
2108 Pleroma.Web.Metadata.Providers.TwitterCard,
2109 Pleroma.Web.Metadata.Providers.RelMe,
2110 Pleroma.Web.Metadata.Providers.Feed
2111 ]
2112 },
2113 %{
2114 key: :unfurl_nsfw,
2115 label: "Unfurl NSFW",
2116 type: :boolean,
2117 description: "When enabled NSFW attachments will be shown in previews"
2118 }
2119 ]
2120 },
2121 %{
2122 group: :pleroma,
2123 key: :rich_media,
2124 type: :group,
2125 description:
2126 "If enabled the instance will parse metadata from attached links to generate link previews.",
2127 children: [
2128 %{
2129 key: :enabled,
2130 type: :boolean,
2131 description: "Enables RichMedia parsing of URLs."
2132 },
2133 %{
2134 key: :ignore_hosts,
2135 type: {:list, :string},
2136 description: "List of hosts which will be ignored by the metadata parser.",
2137 suggestions: ["accounts.google.com", "xss.website"]
2138 },
2139 %{
2140 key: :ignore_tld,
2141 label: "Ignore TLD",
2142 type: {:list, :string},
2143 description: "List TLDs (top-level domains) which will ignore for parse metadata.",
2144 suggestions: ["local", "localdomain", "lan"]
2145 },
2146 %{
2147 key: :parsers,
2148 type: {:list, :module},
2149 description:
2150 "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.",
2151 suggestions: [
2152 Pleroma.Web.RichMedia.Parsers.OEmbed,
2153 Pleroma.Web.RichMedia.Parsers.TwitterCard
2154 ]
2155 },
2156 %{
2157 key: :ttl_setters,
2158 label: "TTL setters",
2159 type: {:list, :module},
2160 description:
2161 "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.",
2162 suggestions: [
2163 Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl
2164 ]
2165 }
2166 ]
2167 },
2168 %{
2169 group: :auto_linker,
2170 key: :opts,
2171 type: :group,
2172 description: "Configuration for the auto_linker library",
2173 children: [
2174 %{
2175 key: :class,
2176 type: [:string, false],
2177 description: "Specify the class to be added to the generated link. Disable to clear",
2178 suggestions: ["auto-linker", false]
2179 },
2180 %{
2181 key: :rel,
2182 type: [:string, false],
2183 description: "Override the rel attribute. Disable to clear",
2184 suggestions: ["ugc", "noopener noreferrer", false]
2185 },
2186 %{
2187 key: :new_window,
2188 type: :boolean,
2189 description: "Link urls will open in new window/tab"
2190 },
2191 %{
2192 key: :truncate,
2193 type: [:integer, false],
2194 description:
2195 "Set to a number to truncate urls longer then the number. Truncated urls will end in `..`",
2196 suggestions: [15, false]
2197 },
2198 %{
2199 key: :strip_prefix,
2200 type: :boolean,
2201 description: "Strip the scheme prefix"
2202 },
2203 %{
2204 key: :extra,
2205 type: :boolean,
2206 description: "Link urls with rarely used schemes (magnet, ipfs, irc, etc.)"
2207 }
2208 ]
2209 },
2210 %{
2211 group: :pleroma,
2212 key: Pleroma.ScheduledActivity,
2213 type: :group,
2214 description: "Scheduled activities settings",
2215 children: [
2216 %{
2217 key: :daily_user_limit,
2218 type: :integer,
2219 description:
2220 "The number of scheduled activities a user is allowed to create in a single day. Default: 25.",
2221 suggestions: [25]
2222 },
2223 %{
2224 key: :total_user_limit,
2225 type: :integer,
2226 description:
2227 "The number of scheduled activities a user is allowed to create in total. Default: 300.",
2228 suggestions: [300]
2229 },
2230 %{
2231 key: :enabled,
2232 type: :boolean,
2233 description: "Whether scheduled activities are sent to the job queue to be executed"
2234 }
2235 ]
2236 },
2237 %{
2238 group: :pleroma,
2239 key: Pleroma.ActivityExpiration,
2240 type: :group,
2241 description: "Expired activity settings",
2242 children: [
2243 %{
2244 key: :enabled,
2245 type: :boolean,
2246 description: "Whether expired activities will be sent to the job queue to be deleted"
2247 }
2248 ]
2249 },
2250 %{
2251 group: :pleroma,
2252 type: :group,
2253 description: "Authenticator",
2254 children: [
2255 %{
2256 key: Pleroma.Web.Auth.Authenticator,
2257 type: :module,
2258 suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator]
2259 }
2260 ]
2261 },
2262 %{
2263 group: :pleroma,
2264 key: :ldap,
2265 type: :group,
2266 description:
2267 "Use LDAP for user authentication. When a user logs in to the Pleroma instance, the name and password" <>
2268 " will be verified by trying to authenticate (bind) to a LDAP server." <>
2269 " If a user exists in the LDAP directory but there is no account with the same name yet on the" <>
2270 " Pleroma instance then a new Pleroma account will be created with the same name as the LDAP user name.",
2271 children: [
2272 %{
2273 key: :enabled,
2274 type: :boolean,
2275 description: "Enables LDAP authentication"
2276 },
2277 %{
2278 key: :host,
2279 type: :string,
2280 description: "LDAP server hostname",
2281 suggestions: ["localhosts"]
2282 },
2283 %{
2284 key: :port,
2285 type: :integer,
2286 description: "LDAP port, e.g. 389 or 636",
2287 suggestions: [389, 636]
2288 },
2289 %{
2290 key: :ssl,
2291 label: "SSL",
2292 type: :boolean,
2293 description: "Enable to use SSL, usually implies the port 636"
2294 },
2295 %{
2296 key: :sslopts,
2297 label: "SSL options",
2298 type: :keyword,
2299 description: "Additional SSL options",
2300 suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
2301 children: [
2302 %{
2303 key: :cacertfile,
2304 type: :string,
2305 description: "Path to file with PEM encoded cacerts",
2306 suggestions: ["path/to/file/with/PEM/cacerts"]
2307 },
2308 %{
2309 key: :verify,
2310 type: :atom,
2311 description: "Type of cert verification",
2312 suggestions: [:verify_peer]
2313 }
2314 ]
2315 },
2316 %{
2317 key: :tls,
2318 label: "TLS",
2319 type: :boolean,
2320 description: "Enable to use STARTTLS, usually implies the port 389"
2321 },
2322 %{
2323 key: :tlsopts,
2324 label: "TLS options",
2325 type: :keyword,
2326 description: "Additional TLS options",
2327 suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
2328 children: [
2329 %{
2330 key: :cacertfile,
2331 type: :string,
2332 description: "Path to file with PEM encoded cacerts",
2333 suggestions: ["path/to/file/with/PEM/cacerts"]
2334 },
2335 %{
2336 key: :verify,
2337 type: :atom,
2338 description: "Type of cert verification",
2339 suggestions: [:verify_peer]
2340 }
2341 ]
2342 },
2343 %{
2344 key: :base,
2345 type: :string,
2346 description: "LDAP base, e.g. \"dc=example,dc=com\"",
2347 suggestions: ["dc=example,dc=com"]
2348 },
2349 %{
2350 key: :uid,
2351 type: :string,
2352 description:
2353 "LDAP attribute name to authenticate the user, e.g. when \"cn\", the filter will be \"cn=username,base\"",
2354 suggestions: ["cn"]
2355 }
2356 ]
2357 },
2358 %{
2359 group: :pleroma,
2360 key: :auth,
2361 type: :group,
2362 description: "Authentication / authorization settings",
2363 children: [
2364 %{
2365 key: :enforce_oauth_admin_scope_usage,
2366 type: :boolean,
2367 description:
2368 "OAuth admin scope requirement toggle. " <>
2369 "If enabled, admin actions explicitly demand admin OAuth scope(s) presence in OAuth token " <>
2370 "(client app must support admin scopes). If disabled and token doesn't have admin scope(s)," <>
2371 "`is_admin` user flag grants access to admin-specific actions."
2372 },
2373 %{
2374 key: :auth_template,
2375 type: :string,
2376 description:
2377 "Authentication form template. By default it's `show.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/show.html.ee`.",
2378 suggestions: ["show.html"]
2379 },
2380 %{
2381 key: :oauth_consumer_template,
2382 type: :string,
2383 description:
2384 "OAuth consumer mode authentication form template. By default it's `consumer.html` which corresponds to" <>
2385 " `lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex`.",
2386 suggestions: ["consumer.html"]
2387 },
2388 %{
2389 key: :oauth_consumer_strategies,
2390 type: {:list, :string},
2391 description:
2392 "The list of enabled OAuth consumer strategies. By default it's set by OAUTH_CONSUMER_STRATEGIES environment variable." <>
2393 " Each entry in this space-delimited string should be of format \"strategy\" or \"strategy:dependency\"" <>
2394 " (e.g. twitter or keycloak:ueberauth_keycloak_strategy in case dependency is named differently than ueberauth_<strategy>).",
2395 suggestions: ["twitter", "keycloak:ueberauth_keycloak_strategy"]
2396 }
2397 ]
2398 },
2399 %{
2400 group: :pleroma,
2401 key: :email_notifications,
2402 type: :group,
2403 description: "Email notifications settings",
2404 children: [
2405 %{
2406 key: :digest,
2407 type: :map,
2408 description:
2409 "emails of \"what you've missed\" for users who have been inactive for a while",
2410 suggestions: [
2411 %{
2412 active: false,
2413 schedule: "0 0 * * 0",
2414 interval: 7,
2415 inactivity_threshold: 7
2416 }
2417 ],
2418 children: [
2419 %{
2420 key: :active,
2421 label: "Enabled",
2422 type: :boolean,
2423 description: "Globally enable or disable digest emails"
2424 },
2425 %{
2426 key: :schedule,
2427 type: :string,
2428 description:
2429 "When to send digest email, in crontab format. \"0 0 0\" is the default, meaning \"once a week at midnight on Sunday morning\".",
2430 suggestions: ["0 0 * * 0"]
2431 },
2432 %{
2433 key: :interval,
2434 type: :integer,
2435 description: "Minimum interval between digest emails to one user",
2436 suggestions: [7]
2437 },
2438 %{
2439 key: :inactivity_threshold,
2440 type: :integer,
2441 description: "Minimum user inactivity threshold",
2442 suggestions: [7]
2443 }
2444 ]
2445 }
2446 ]
2447 },
2448 %{
2449 group: :pleroma,
2450 key: Pleroma.Emails.UserEmail,
2451 type: :group,
2452 description: "Email template settings",
2453 children: [
2454 %{
2455 key: :logo,
2456 type: :string,
2457 description: "A path to a custom logo. Set it to `nil` to use the default Pleroma logo.",
2458 suggestions: ["some/path/logo.png"]
2459 },
2460 %{
2461 key: :styling,
2462 type: :map,
2463 description: "a map with color settings for email templates.",
2464 suggestions: [
2465 %{
2466 link_color: "#d8a070",
2467 background_color: "#2C3645",
2468 content_background_color: "#1B2635",
2469 header_color: "#d8a070",
2470 text_color: "#b9b9ba",
2471 text_muted_color: "#b9b9ba"
2472 }
2473 ],
2474 children: [
2475 %{
2476 key: :link_color,
2477 type: :string,
2478 suggestions: ["#d8a070"]
2479 },
2480 %{
2481 key: :background_color,
2482 type: :string,
2483 suggestions: ["#2C3645"]
2484 },
2485 %{
2486 key: :content_background_color,
2487 type: :string,
2488 suggestions: ["#1B2635"]
2489 },
2490 %{
2491 key: :header_color,
2492 type: :string,
2493 suggestions: ["#d8a070"]
2494 },
2495 %{
2496 key: :text_color,
2497 type: :string,
2498 suggestions: ["#b9b9ba"]
2499 },
2500 %{
2501 key: :text_muted_color,
2502 type: :string,
2503 suggestions: ["#b9b9ba"]
2504 }
2505 ]
2506 }
2507 ]
2508 },
2509 %{
2510 group: :pleroma,
2511 key: Pleroma.Emails.NewUsersDigestEmail,
2512 type: :group,
2513 description: "New users admin email digest",
2514 children: [
2515 %{
2516 key: :enabled,
2517 type: :boolean,
2518 description: "enables new users admin digest email when `true`",
2519 suggestions: [false]
2520 }
2521 ]
2522 },
2523 %{
2524 group: :pleroma,
2525 key: :oauth2,
2526 type: :group,
2527 description: "Configure OAuth 2 provider capabilities",
2528 children: [
2529 %{
2530 key: :token_expires_in,
2531 type: :integer,
2532 description: "The lifetime in seconds of the access token",
2533 suggestions: [600]
2534 },
2535 %{
2536 key: :issue_new_refresh_token,
2537 type: :boolean,
2538 description:
2539 "Keeps old refresh token or generate new refresh token when to obtain an access token"
2540 },
2541 %{
2542 key: :clean_expired_tokens,
2543 type: :boolean,
2544 description: "Enable a background job to clean expired oauth tokens. Default: disabled."
2545 }
2546 ]
2547 },
2548 %{
2549 group: :pleroma,
2550 key: :emoji,
2551 type: :group,
2552 children: [
2553 %{
2554 key: :shortcode_globs,
2555 type: {:list, :string},
2556 description: "Location of custom emoji files. * can be used as a wildcard.",
2557 suggestions: ["/emoji/custom/**/*.png"]
2558 },
2559 %{
2560 key: :pack_extensions,
2561 type: {:list, :string},
2562 description:
2563 "A list of file extensions for emojis, when no emoji.txt for a pack is present",
2564 suggestions: [".png", ".gif"]
2565 },
2566 %{
2567 key: :groups,
2568 type: {:keyword, :string, {:list, :string}},
2569 description:
2570 "Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the group name" <>
2571 " and the value is the location or array of locations. * can be used as a wildcard.",
2572 suggestions: [
2573 Custom: ["/emoji/*.png", "/emoji/**/*.png"]
2574 ]
2575 },
2576 %{
2577 key: :default_manifest,
2578 type: :string,
2579 description:
2580 "Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download." <>
2581 " Currently only one manifest can be added (no arrays).",
2582 suggestions: ["https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json"]
2583 },
2584 %{
2585 key: :shared_pack_cache_seconds_per_file,
2586 label: "Shared pack cache s/file",
2587 type: :integer,
2588 descpiption:
2589 "When an emoji pack is shared, the archive is created and cached in memory" <>
2590 " for this amount of seconds multiplied by the number of files.",
2591 suggestions: [60]
2592 }
2593 ]
2594 },
2595 %{
2596 group: :pleroma,
2597 key: :rate_limit,
2598 type: :group,
2599 description:
2600 "Rate limit settings. This is an advanced feature enabled only for :authentication by default.",
2601 children: [
2602 %{
2603 key: :search,
2604 type: [:tuple, {:list, :tuple}],
2605 description: "For the search requests (account & status search etc.)",
2606 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2607 },
2608 %{
2609 key: :timeline,
2610 type: [:tuple, {:list, :tuple}],
2611 description: "For requests to timelines (each timeline has it's own limiter)",
2612 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2613 },
2614 %{
2615 key: :app_account_creation,
2616 type: [:tuple, {:list, :tuple}],
2617 description: "For registering user accounts from the same IP address",
2618 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2619 },
2620 %{
2621 key: :relations_actions,
2622 type: [:tuple, {:list, :tuple}],
2623 description: "For actions on relationships with all users (follow, unfollow)",
2624 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2625 },
2626 %{
2627 key: :relation_id_action,
2628 type: [:tuple, {:list, :tuple}],
2629 description: "For actions on relation with a specific user (follow, unfollow)",
2630 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2631 },
2632 %{
2633 key: :statuses_actions,
2634 type: [:tuple, {:list, :tuple}],
2635 description:
2636 "For create / delete / fav / unfav / reblog / unreblog actions on any statuses",
2637 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2638 },
2639 %{
2640 key: :status_id_action,
2641 type: [:tuple, {:list, :tuple}],
2642 description:
2643 "For fav / unfav or reblog / unreblog actions on the same status by the same user",
2644 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2645 },
2646 %{
2647 key: :authentication,
2648 type: [:tuple, {:list, :tuple}],
2649 description: "For authentication create / password check / user existence check requests",
2650 suggestions: [{60_000, 15}]
2651 }
2652 ]
2653 },
2654 %{
2655 group: :esshd,
2656 type: :group,
2657 description:
2658 "Before enabling this you must add :esshd to mix.exs as one of the extra_applications " <>
2659 "and generate host keys in your priv dir with ssh-keygen -m PEM -N \"\" -b 2048 -t rsa -f ssh_host_rsa_key",
2660 children: [
2661 %{
2662 key: :enabled,
2663 type: :boolean,
2664 description: "Enables SSH"
2665 },
2666 %{
2667 key: :priv_dir,
2668 type: :string,
2669 description: "Dir with SSH keys",
2670 suggestions: ["/some/path/ssh_keys"]
2671 },
2672 %{
2673 key: :handler,
2674 type: :string,
2675 description: "Handler module",
2676 suggestions: ["Pleroma.BBS.Handler"]
2677 },
2678 %{
2679 key: :port,
2680 type: :integer,
2681 description: "Port to connect",
2682 suggestions: [10_022]
2683 },
2684 %{
2685 key: :password_authenticator,
2686 type: :string,
2687 description: "Authenticator module",
2688 suggestions: ["Pleroma.BBS.Authenticator"]
2689 }
2690 ]
2691 },
2692 %{
2693 group: :mime,
2694 type: :group,
2695 description: "Mime types",
2696 children: [
2697 %{
2698 key: :types,
2699 type: :map,
2700 suggestions: [
2701 %{
2702 "application/xml" => ["xml"],
2703 "application/xrd+xml" => ["xrd+xml"],
2704 "application/jrd+json" => ["jrd+json"],
2705 "application/activity+json" => ["activity+json"],
2706 "application/ld+json" => ["activity+json"]
2707 }
2708 ],
2709 children: [
2710 %{
2711 key: "application/xml",
2712 type: {:list, :string},
2713 suggestions: ["xml"]
2714 },
2715 %{
2716 key: "application/xrd+xml",
2717 type: {:list, :string},
2718 suggestions: ["xrd+xml"]
2719 },
2720 %{
2721 key: "application/jrd+json",
2722 type: {:list, :string},
2723 suggestions: ["jrd+json"]
2724 },
2725 %{
2726 key: "application/activity+json",
2727 type: {:list, :string},
2728 suggestions: ["activity+json"]
2729 },
2730 %{
2731 key: "application/ld+json",
2732 type: {:list, :string},
2733 suggestions: ["activity+json"]
2734 }
2735 ]
2736 }
2737 ]
2738 },
2739 %{
2740 group: :pleroma,
2741 key: :chat,
2742 type: :group,
2743 description: "Pleroma chat settings",
2744 children: [
2745 %{
2746 key: :enabled,
2747 type: :boolean
2748 }
2749 ]
2750 },
2751 %{
2752 group: :pleroma,
2753 key: :http,
2754 type: :group,
2755 description: "HTTP settings",
2756 children: [
2757 %{
2758 key: :proxy_url,
2759 label: "Proxy URL",
2760 type: [:string, :tuple],
2761 description: "Proxy URL",
2762 suggestions: ["localhost:9020", {:socks5, :localhost, 3090}]
2763 },
2764 %{
2765 key: :send_user_agent,
2766 type: :boolean
2767 },
2768 %{
2769 key: :user_agent,
2770 type: [:string, :atom],
2771 description:
2772 "What user agent to use. Must be a string or an atom `:default`. Default value is `:default`.",
2773 suggestions: ["Pleroma", :default]
2774 },
2775 %{
2776 key: :adapter,
2777 type: :keyword,
2778 description: "Adapter specific options",
2779 suggestions: [],
2780 children: [
2781 %{
2782 key: :ssl_options,
2783 type: :keyword,
2784 label: "SSL Options",
2785 description: "SSL options for HTTP adapter",
2786 children: [
2787 %{
2788 key: :versions,
2789 type: {:list, :atom},
2790 description: "List of TLS version to use",
2791 suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
2792 }
2793 ]
2794 }
2795 ]
2796 }
2797 ]
2798 },
2799 %{
2800 group: :pleroma,
2801 key: :markup,
2802 type: :group,
2803 children: [
2804 %{
2805 key: :allow_inline_images,
2806 type: :boolean
2807 },
2808 %{
2809 key: :allow_headings,
2810 type: :boolean
2811 },
2812 %{
2813 key: :allow_tables,
2814 type: :boolean
2815 },
2816 %{
2817 key: :allow_fonts,
2818 type: :boolean
2819 },
2820 %{
2821 key: :scrub_policy,
2822 type: {:list, :module},
2823 description:
2824 "Module names are shortened (removed leading `Pleroma.HTML.` part), but on adding custom module you need to use full name.",
2825 suggestions: [Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]
2826 }
2827 ]
2828 },
2829 %{
2830 group: :pleroma,
2831 key: :user,
2832 type: :group,
2833 children: [
2834 %{
2835 key: :deny_follow_blocked,
2836 type: :boolean
2837 }
2838 ]
2839 },
2840 %{
2841 group: :pleroma,
2842 tab: :mrf,
2843 key: :mrf_normalize_markup,
2844 label: "MRF normalize markup",
2845 description: "MRF NormalizeMarkup settings. Scrub configured hypertext markup.",
2846 type: :group,
2847 children: [
2848 %{
2849 key: :scrub_policy,
2850 type: :module,
2851 suggestions: [Pleroma.HTML.Scrubber.Default]
2852 }
2853 ]
2854 },
2855 %{
2856 group: :pleroma,
2857 key: Pleroma.User,
2858 type: :group,
2859 children: [
2860 %{
2861 key: :restricted_nicknames,
2862 type: {:list, :string},
2863 suggestions: [
2864 ".well-known",
2865 "~",
2866 "about",
2867 "activities",
2868 "api",
2869 "auth",
2870 "check_password",
2871 "dev",
2872 "friend-requests",
2873 "inbox",
2874 "internal",
2875 "main",
2876 "media",
2877 "nodeinfo",
2878 "notice",
2879 "oauth",
2880 "objects",
2881 "ostatus_subscribe",
2882 "pleroma",
2883 "proxy",
2884 "push",
2885 "registration",
2886 "relay",
2887 "settings",
2888 "status",
2889 "tag",
2890 "user-search",
2891 "user_exists",
2892 "users",
2893 "web"
2894 ]
2895 }
2896 ]
2897 },
2898 %{
2899 group: :cors_plug,
2900 type: :group,
2901 children: [
2902 %{
2903 key: :max_age,
2904 type: :integer,
2905 suggestions: [86_400]
2906 },
2907 %{
2908 key: :methods,
2909 type: {:list, :string},
2910 suggestions: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]
2911 },
2912 %{
2913 key: :expose,
2914 type: {:list, :string},
2915 suggestions: [
2916 "Link",
2917 "X-RateLimit-Reset",
2918 "X-RateLimit-Limit",
2919 "X-RateLimit-Remaining",
2920 "X-Request-Id",
2921 "Idempotency-Key"
2922 ]
2923 },
2924 %{
2925 key: :credentials,
2926 type: :boolean
2927 },
2928 %{
2929 key: :headers,
2930 type: {:list, :string},
2931 suggestions: ["Authorization", "Content-Type", "Idempotency-Key"]
2932 }
2933 ]
2934 },
2935 %{
2936 group: :pleroma,
2937 key: Pleroma.Plugs.RemoteIp,
2938 type: :group,
2939 description: """
2940 `Pleroma.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration.
2941 **If your instance is not behind at least one reverse proxy, you should not enable this plug.**
2942 """,
2943 children: [
2944 %{
2945 key: :enabled,
2946 type: :boolean,
2947 description: "Enable/disable the plug. Default: disabled."
2948 },
2949 %{
2950 key: :headers,
2951 type: {:list, :string},
2952 description:
2953 "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]`."
2954 },
2955 %{
2956 key: :proxies,
2957 type: {:list, :string},
2958 description:
2959 "A list of strings in [CIDR](https://en.wikipedia.org/wiki/CIDR) notation specifying the IPs of known proxies. Default: `[]`."
2960 },
2961 %{
2962 key: :reserved,
2963 type: {:list, :string},
2964 description:
2965 "Defaults to [localhost](https://en.wikipedia.org/wiki/Localhost) and [private network](https://en.wikipedia.org/wiki/Private_network)."
2966 }
2967 ]
2968 },
2969 %{
2970 group: :pleroma,
2971 key: :web_cache_ttl,
2972 type: :group,
2973 description:
2974 "The expiration time for the web responses cache. Values should be in milliseconds or `nil` to disable expiration.",
2975 children: [
2976 %{
2977 key: :activity_pub,
2978 type: :integer,
2979 description:
2980 "Activity pub routes (except question activities). Default: `nil` (no expiration).",
2981 suggestions: [30_000, nil]
2982 },
2983 %{
2984 key: :activity_pub_question,
2985 type: :integer,
2986 description: "Activity pub routes (question activities). Default: `30_000` (30 seconds).",
2987 suggestions: [30_000]
2988 }
2989 ]
2990 },
2991 %{
2992 group: :pleroma,
2993 key: :static_fe,
2994 type: :group,
2995 description:
2996 "Render profiles and posts using server-generated HTML that is viewable without using JavaScript.",
2997 children: [
2998 %{
2999 key: :enabled,
3000 type: :boolean,
3001 description: "Enables the rendering of static HTML. Default: disabled."
3002 }
3003 ]
3004 },
3005 %{
3006 group: :pleroma,
3007 key: :feed,
3008 type: :group,
3009 description: "Configure feed rendering",
3010 children: [
3011 %{
3012 key: :post_title,
3013 type: :map,
3014 description: "Configure title rendering.",
3015 children: [
3016 %{
3017 key: :max_length,
3018 type: :integer,
3019 description: "Maximum number of characters before truncating title.",
3020 suggestions: [100]
3021 },
3022 %{
3023 key: :omission,
3024 type: :string,
3025 description: "Replacement which will be used after truncating string.",
3026 suggestions: ["..."]
3027 }
3028 ]
3029 }
3030 ]
3031 },
3032 %{
3033 group: :pleroma,
3034 key: :mrf_object_age,
3035 tab: :mrf,
3036 type: :group,
3037 description: "Rejects or delists posts based on their age when received.",
3038 children: [
3039 %{
3040 key: :threshold,
3041 type: :integer,
3042 description: "Required age (in seconds) of a post before actions are taken.",
3043 suggestions: [172_800]
3044 },
3045 %{
3046 key: :actions,
3047 type: {:list, :atom},
3048 description:
3049 "A list of actions to apply to the post. `:delist` removes the post from public timelines; " <>
3050 "`:strip_followers` removes followers from the ActivityPub recipient list, ensuring they won't be delivered to home timelines; " <>
3051 "`:reject` rejects the message entirely",
3052 suggestions: [:delist, :strip_followers, :reject]
3053 }
3054 ]
3055 },
3056 %{
3057 group: :pleroma,
3058 key: :modules,
3059 type: :group,
3060 description: "Custom Runtime Modules",
3061 children: [
3062 %{
3063 key: :runtime_dir,
3064 type: :string,
3065 description: "A path to custom Elixir modules (such as MRF policies)."
3066 }
3067 ]
3068 },
3069 %{
3070 group: :pleroma,
3071 key: :streamer,
3072 type: :group,
3073 description: "Settings for notifications streamer",
3074 children: [
3075 %{
3076 key: :workers,
3077 type: :integer,
3078 description: "Number of workers to send notifications.",
3079 suggestions: [3]
3080 },
3081 %{
3082 key: :overflow_workers,
3083 type: :integer,
3084 description: "Maximum number of workers created if pool is empty.",
3085 suggestions: [2]
3086 }
3087 ]
3088 },
3089 %{
3090 group: :pleroma,
3091 key: :connections_pool,
3092 type: :group,
3093 description: "Advanced settings for `gun` connections pool",
3094 children: [
3095 %{
3096 key: :checkin_timeout,
3097 type: :integer,
3098 description: "Timeout to checkin connection from pool. Default: 250ms.",
3099 suggestions: [250]
3100 },
3101 %{
3102 key: :max_connections,
3103 type: :integer,
3104 description: "Maximum number of connections in the pool. Default: 250 connections.",
3105 suggestions: [250]
3106 },
3107 %{
3108 key: :retry,
3109 type: :integer,
3110 description:
3111 "Number of retries, while `gun` will try to reconnect if connection goes down. Default: 1.",
3112 suggestions: [1]
3113 },
3114 %{
3115 key: :retry_timeout,
3116 type: :integer,
3117 description:
3118 "Time between retries when `gun` will try to reconnect in milliseconds. Default: 1000ms.",
3119 suggestions: [1000]
3120 },
3121 %{
3122 key: :await_up_timeout,
3123 type: :integer,
3124 description: "Timeout while `gun` will wait until connection is up. Default: 5000ms.",
3125 suggestions: [5000]
3126 }
3127 ]
3128 },
3129 %{
3130 group: :pleroma,
3131 key: :pools,
3132 type: :group,
3133 description: "Advanced settings for `gun` workers pools",
3134 children: [
3135 %{
3136 key: :federation,
3137 type: :keyword,
3138 description: "Settings for federation pool.",
3139 children: [
3140 %{
3141 key: :size,
3142 type: :integer,
3143 description: "Number workers in the pool.",
3144 suggestions: [50]
3145 },
3146 %{
3147 key: :max_overflow,
3148 type: :integer,
3149 description: "Number of additional workers if pool is under load.",
3150 suggestions: [10]
3151 },
3152 %{
3153 key: :timeout,
3154 type: :integer,
3155 description: "Timeout while `gun` will wait for response.",
3156 suggestions: [150_000]
3157 }
3158 ]
3159 },
3160 %{
3161 key: :media,
3162 type: :keyword,
3163 description: "Settings for media pool.",
3164 children: [
3165 %{
3166 key: :size,
3167 type: :integer,
3168 description: "Number workers in the pool.",
3169 suggestions: [50]
3170 },
3171 %{
3172 key: :max_overflow,
3173 type: :integer,
3174 description: "Number of additional workers if pool is under load.",
3175 suggestions: [10]
3176 },
3177 %{
3178 key: :timeout,
3179 type: :integer,
3180 description: "Timeout while `gun` will wait for response.",
3181 suggestions: [150_000]
3182 }
3183 ]
3184 },
3185 %{
3186 key: :upload,
3187 type: :keyword,
3188 description: "Settings for upload pool.",
3189 children: [
3190 %{
3191 key: :size,
3192 type: :integer,
3193 description: "Number workers in the pool.",
3194 suggestions: [25]
3195 },
3196 %{
3197 key: :max_overflow,
3198 type: :integer,
3199 description: "Number of additional workers if pool is under load.",
3200 suggestions: [5]
3201 },
3202 %{
3203 key: :timeout,
3204 type: :integer,
3205 description: "Timeout while `gun` will wait for response.",
3206 suggestions: [300_000]
3207 }
3208 ]
3209 },
3210 %{
3211 key: :default,
3212 type: :keyword,
3213 description: "Settings for default pool.",
3214 children: [
3215 %{
3216 key: :size,
3217 type: :integer,
3218 description: "Number workers in the pool.",
3219 suggestions: [10]
3220 },
3221 %{
3222 key: :max_overflow,
3223 type: :integer,
3224 description: "Number of additional workers if pool is under load.",
3225 suggestions: [2]
3226 },
3227 %{
3228 key: :timeout,
3229 type: :integer,
3230 description: "Timeout while `gun` will wait for response.",
3231 suggestions: [10_000]
3232 }
3233 ]
3234 }
3235 ]
3236 },
3237 %{
3238 group: :pleroma,
3239 key: :hackney_pools,
3240 type: :group,
3241 description: "Advanced settings for `hackney` connections pools",
3242 children: [
3243 %{
3244 key: :federation,
3245 type: :keyword,
3246 description: "Settings for federation pool.",
3247 children: [
3248 %{
3249 key: :max_connections,
3250 type: :integer,
3251 description: "Number workers in the pool.",
3252 suggestions: [50]
3253 },
3254 %{
3255 key: :timeout,
3256 type: :integer,
3257 description: "Timeout while `hackney` will wait for response.",
3258 suggestions: [150_000]
3259 }
3260 ]
3261 },
3262 %{
3263 key: :media,
3264 type: :keyword,
3265 description: "Settings for media pool.",
3266 children: [
3267 %{
3268 key: :max_connections,
3269 type: :integer,
3270 description: "Number workers in the pool.",
3271 suggestions: [50]
3272 },
3273 %{
3274 key: :timeout,
3275 type: :integer,
3276 description: "Timeout while `hackney` will wait for response.",
3277 suggestions: [150_000]
3278 }
3279 ]
3280 },
3281 %{
3282 key: :upload,
3283 type: :keyword,
3284 description: "Settings for upload pool.",
3285 children: [
3286 %{
3287 key: :max_connections,
3288 type: :integer,
3289 description: "Number workers in the pool.",
3290 suggestions: [25]
3291 },
3292 %{
3293 key: :timeout,
3294 type: :integer,
3295 description: "Timeout while `hackney` will wait for response.",
3296 suggestions: [300_000]
3297 }
3298 ]
3299 }
3300 ]
3301 },
3302 %{
3303 group: :pleroma,
3304 key: :restrict_unauthenticated,
3305 type: :group,
3306 description:
3307 "Disallow viewing timelines, user profiles and statuses for unauthenticated users.",
3308 children: [
3309 %{
3310 key: :timelines,
3311 type: :map,
3312 description: "Settings for public and federated timelines.",
3313 children: [
3314 %{
3315 key: :local,
3316 type: :boolean,
3317 description: "Disallow view public timeline."
3318 },
3319 %{
3320 key: :federated,
3321 type: :boolean,
3322 description: "Disallow view federated timeline."
3323 }
3324 ]
3325 },
3326 %{
3327 key: :profiles,
3328 type: :map,
3329 description: "Settings for user profiles.",
3330 children: [
3331 %{
3332 key: :local,
3333 type: :boolean,
3334 description: "Disallow view local user profiles."
3335 },
3336 %{
3337 key: :remote,
3338 type: :boolean,
3339 description: "Disallow view remote user profiles."
3340 }
3341 ]
3342 },
3343 %{
3344 key: :activities,
3345 type: :map,
3346 description: "Settings for statuses.",
3347 children: [
3348 %{
3349 key: :local,
3350 type: :boolean,
3351 description: "Disallow view local statuses."
3352 },
3353 %{
3354 key: :remote,
3355 type: :boolean,
3356 description: "Disallow view remote statuses."
3357 }
3358 ]
3359 }
3360 ]
3361 },
3362 %{
3363 group: :pleroma,
3364 key: Pleroma.Web.ApiSpec.CastAndValidate,
3365 type: :group,
3366 children: [
3367 %{
3368 key: :strict,
3369 type: :boolean,
3370 description:
3371 "Enables strict input validation (useful in development, not recommended in production)",
3372 suggestions: [false]
3373 }
3374 ]
3375 },
3376 %{
3377 group: :pleroma,
3378 key: :mrf,
3379 tab: :mrf,
3380 type: :group,
3381 description: "General MRF settings",
3382 children: [
3383 %{
3384 key: :policies,
3385 type: [:module, {:list, :module}],
3386 description:
3387 "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.",
3388 suggestions:
3389 Generator.list_modules_in_dir(
3390 "lib/pleroma/web/activity_pub/mrf",
3391 "Elixir.Pleroma.Web.ActivityPub.MRF."
3392 )
3393 },
3394 %{
3395 key: :transparency,
3396 label: "MRF transparency",
3397 type: :boolean,
3398 description:
3399 "Make the content of your Message Rewrite Facility settings public (via nodeinfo)"
3400 },
3401 %{
3402 key: :transparency_exclusions,
3403 label: "MRF transparency exclusions",
3404 type: {:list, :string},
3405 description:
3406 "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.",
3407 suggestions: [
3408 "exclusion.com"
3409 ]
3410 }
3411 ]
3412 }
3413 ]