{ pkgs, ... }: let inherit ((pkgs.formats.elixirConf { }).lib) mkRaw; mangane = pkgs.stdenv.mkDerivation rec { pname = "mangane"; version = "1.19.4"; src = pkgs.fetchzip { url = "https://github.com/BDX-town/Mangane/releases/download/${version}/static.zip"; hash = "sha256-Z+3rhqAlPX1sO0Lswky0rMe9pZmdFGWrckHDJnaCyQU="; stripRoot = false; }; installPhase = '' runHook preInstall mkdir -p $out cp -r dist/* $out/ runHook postInstall ''; }; in { networking.firewall.interfaces.wg0.allowedTCPPorts = [ 4000 ]; services.postgresql = { enable = true; }; services.akkoma = { enable = true; frontends = { primary = { package = mangane; name = "mangane"; ref = "stable"; }; admin = { package = pkgs.akkoma-admin-fe; name = "admin-fe"; ref = "stable"; }; }; config = { ":pleroma" = { "Pleroma.Web.Endpoint" = { http = { ip = "10.10.0.2"; port = 4000; }; url = { host = "akkoma.ellie.town"; scheme = "https"; port = 443; }; }; "Pleroma.Upload" = { base_url = "https://media.ellie.town"; filters = map mkRaw [ "Pleroma.Upload.Filter.Exiftool.StripMetadata" ]; }; ":instance" = { name = "ellie town"; email = "wizzeh@protonmail.com"; notify_email = "akkoma@ellie.town"; description = "ellie's akkoma instance"; registrations_open = false; invites_enabled = false; account_approval_required = false; federating = true; allow_relay = true; languages = ["en"]; public = false; safe_dm_mentions = true; healthcheck = true; limit = 5000; }; ":configurable_from_database" = true; ":http_security" = { sts = true; referrer_policy = "same-origin"; }; ":mrf" = { policies = map mkRaw [ "Pleroma.Web.ActivityPub.MRF.SimplePolicy" "Pleroma.Web.ActivityPub.MRF.HellthreadPolicy" "Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy" ]; }; ":mrf_hellthread" = { delist_threshold = 10; reject_threshold = 20; }; }; }; }; }