nix-cfg/hosts/laptop/akkoma/akkoma.nix

53 lines
2 KiB
Nix
Raw Normal View History

2024-02-18 10:48:52 +01:00
{ pkgs, lib, config, ... }:
let
inherit ((pkgs.formats.elixirConf {}).lib) mkMap mkAtom mkRaw mkTuple;
in
{
services.akkoma = {
enable = true;
initSecrets = false;
patches.configurableFromDatabase = true;
# frontends.mastodon = {
# package = ;
# name = "mastodon-fe";
# ref = "stable";
# };
extraPackages = with pkgs; [ zip unzip exiftool ffmpeg_5-headless graphicsmagick-imagemagick-compat ];
config = {
":pleroma".":instance" = {
name = "My Akkoma instance";
description = "Akkoma instance description";
email = "user@localhost";
registration_open = false;
federating = false;
upload_dir = "/data/uploads";
static_dir = "/data/akkoma/static";
};
":pleroma"."Pleroma.Web.Endpoint" = {
url.host = config.myAkkomaContainerOptions.domain;
http.ip = config.myAkkomaContainerOptions.localAddress;
http.port = config.myAkkomaContainerOptions.localPort;
};
":pleroma"."Pleroma.Uploaders.Local".uploads = "/data/uploads";
":pleroma".":mrf".policies = map mkRaw [
"Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy"
"Pleroma.Web.ActivityPub.MRF.TagPolicy"
"Pleroma.Web.ActivityPub.MRF.SimplePolicy"
];
":pleroma".":mrf_simple".accept = [
(mkTuple ["good.instance" "good!"])
];
":pleroma"."Pleroma.Web.Endpoint".secret_key_base = { _secret = "/run/secrets/akkotest/key-base"; };
":pleroma"."Pleroma.Web.Endpoint".signing_salt = { _secret = "/run/secrets/akkotest/signing-salt"; };
":pleroma"."Pleroma.Web.Endpoint".live_view.signing_salt = { _secret = "/run/secrets/akkotest/liveview-salt"; };
":web_push_encryption".":vapid_details".private_key = { _secret = "/run/secrets/akkotest/vapid-private"; };
":web_push_encryption".":vapid_details".public_key = { _secret = "/run/secrets/akkotest/vapid-public"; };
":joken".":default_signer" = { _secret = "/run/secrets/akkotest/jwt-signer"; };
};
};
}