From f02e3826b2a21f4d6d6e63eb5e00ab9f270a0f04 Mon Sep 17 00:00:00 2001 From: sefidel Date: Mon, 6 Feb 2023 18:18:41 +0900 Subject: feat(nixos/cobalt): akkoma: init --- nixos/cobalt/services/akkoma.nix | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 nixos/cobalt/services/akkoma.nix (limited to 'nixos/cobalt/services/akkoma.nix') 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"; + }; + }; +} -- cgit 1.4.1