about summary refs log tree commit diff
path: root/nixos/cobalt/services/akkoma.nix
blob: 7164b3f6eac7fef32636d4cd4ca6df6a2b167821 (plain)
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
{ pkgs, lib, ... }:

let
  poorObfuscation = y: x: "${x}@${y}";
  federation-blocklist = lib.importTOML ./akkoma-assets/blocklist.toml;
in
{
  services.akkoma = {
    enable = true;
    initDb.enable = true;

    # extraStatic = {
    #   "favicon.png" =
    # };
    config = let inherit ((pkgs.formats.elixirConf { }).lib) mkRaw mkMap;
    in {
      ":pleroma"."Pleroma.Web.Endpoint".url.host = "social.sefidel.com";
      ":pleroma".":media_proxy".enabled = false;
      ":pleroma".":instance" = {
        name = "Akkoma at sefidel";
        description = "Private akkoma instance";
        email = poorObfuscation "sefidel.com" "postmaster";
        notify_email = poorObfuscation "sefidel.com" "postmaster";

        registrations_open = false;
        invites_enabled = true;

        limit = 5000;
      };
      ":pleroma".":mrf" = {
        policies = map mkRaw [ "Pleroma.Web.ActivityPub.MRF.SimplePolicy" ];
      };
      ":pleroma".":mrf_simple" = {
        followers_only = mkMap federation-blocklist.followers_only;
        media_nsfw = mkMap federation-blocklist.media_nsfw;
        reject = mkMap federation-blocklist.reject;
      };
    };

    nginx = {
      forceSSL = true;
      useACMEHost = "sefidel.com";
    };
  };
}