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