diff options
author | sefidel <contact@sefidel.net> | 2023-02-06 18:18:41 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2023-02-06 18:26:22 +0900 |
commit | f02e3826b2a21f4d6d6e63eb5e00ab9f270a0f04 (patch) | |
tree | a37a4aa3c8a85306b6b188c6232885a9814a108e /nixos/cobalt/services/akkoma.nix | |
parent | aa3c0e6727d33388dc61698882f89d23a821594c (diff) | |
download | nixrc-f02e3826b2a21f4d6d6e63eb5e00ab9f270a0f04.tar.gz nixrc-f02e3826b2a21f4d6d6e63eb5e00ab9f270a0f04.zip |
feat(nixos/cobalt): akkoma: init
Diffstat (limited to 'nixos/cobalt/services/akkoma.nix')
-rw-r--r-- | nixos/cobalt/services/akkoma.nix | 45 |
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"; + }; + }; +} |