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