ctucx.git: alpine-pkgs

My personal alpine-packages [deprecated in favor of nixos]

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
import Config

config :pleroma, Pleroma.Web.Endpoint,
  url: [host: "pleroma.example.com", scheme: "https", port: 443],
  http: [ip: {127, 0, 0, 1}, port: 4000]

config :pleroma, Pleroma.Repo,
  adapter:    Ecto.Adapters.Postgres,
  username:   "pleroma",
  database:   "pleroma",
  socket_dir: "/run/postgresql",
  pool_size: 10


# We can't store the secrets in this file, since this is baked into the docker image
if not File.exists?("/var/lib/pleroma/secret.exs") do
  secret = :crypto.strong_rand_bytes(64) |> Base.encode64() |> binary_part(0, 64)
  signing_salt = :crypto.strong_rand_bytes(8) |> Base.encode64() |> binary_part(0, 8)
  {web_push_public_key, web_push_private_key} = :crypto.generate_key(:ecdh, :prime256v1)

  secret_file =
    EEx.eval_string(
      """
      import Config

      config :pleroma, Pleroma.Web.Endpoint,
        secret_key_base: "<%= secret %>",
        signing_salt: "<%= signing_salt %>"

      config :web_push_encryption, :vapid_details,
        public_key: "<%= web_push_public_key %>",
        private_key: "<%= web_push_private_key %>"
      """,
      secret: secret,
      signing_salt: signing_salt,
      web_push_public_key: Base.url_encode64(web_push_public_key, padding: false),
      web_push_private_key: Base.url_encode64(web_push_private_key, padding: false)
    )

  File.write("/var/lib/pleroma/secret.exs", secret_file)
end
import_config("/var/lib/pleroma/secret.exs")

# Configure web push notifications
config :web_push_encryption, :vapid_details, subject: "mailto:pleroma@example.com"

config :pleroma, :database, rum_enabled: false
config :pleroma, :instance, static_dir: "/var/lib/pleroma/static"
config :pleroma, Pleroma.Uploaders.Local, uploads: "/var/lib/pleroma/uploads"

config :pleroma, :static_fe, enabled: false

config :pleroma, :frontend_configurations,
  pleroma_fe: %{
    theme: "breezy-dark",
    chatDisabled: true,
    webPushNotifications: true,
    showFeaturesPanel: false,
    collapseMessageWithSubject: false,
    hideUserStats: false
  }

config :pleroma, :instance,
  name: "pleroma",
  email: "pleroma@example.com",
  limit: 5000,
  registrations_open: false,
  invites_enabled: true,
  account_activation_required: false,
  remote_post_retention_days: 50,
  external_user_synchronization: true,
  allowed_post_formats: [
    "text/plain",
    "text/html",
    "text/markdown"
  ]

config :pleroma, :media_proxy,
  enabled: false,
  redirect_on_failure: true,
  base_url: "https://cache.domain.tld"

config :pleroma, :fetch_initial_posts,
  enabled: false,
  pages: 1

config :pleroma, :chat, enabled: false