about summary refs log tree commit diff
path: root/nixos/cobalt/services/akkoma.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/cobalt/services/akkoma.nix')
-rw-r--r--nixos/cobalt/services/akkoma.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/nixos/cobalt/services/akkoma.nix b/nixos/cobalt/services/akkoma.nix
new file mode 100644
index 0000000..7164b3f
--- /dev/null
+++ b/nixos/cobalt/services/akkoma.nix
@@ -0,0 +1,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";
+    };
+  };
+}