2025-01-02 14:49:22 +04:00
|
|
|
{ config, lib, pkgs, ... }:
|
2025-01-02 12:27:19 +04:00
|
|
|
with lib;
|
|
|
|
let cfg = config.void.server.fedi.akkoma;
|
|
|
|
in {
|
|
|
|
options.void.server.fedi.akkoma = { enable = mkEnableOption false; };
|
|
|
|
|
|
|
|
# :(
|
|
|
|
config = mkIf cfg.enable {
|
2025-01-02 14:47:50 +04:00
|
|
|
security.acme.certs = {
|
2025-01-02 14:58:47 +04:00
|
|
|
"social.sako.lol" = {
|
|
|
|
credentialsFile = "/srv/secrets/porkbun";
|
|
|
|
dnsProvider = "porkbun";
|
|
|
|
webroot = null;
|
|
|
|
};
|
|
|
|
"media.social.sako.lol" = {
|
|
|
|
credentialsFile = "/srv/secrets/porkbun";
|
|
|
|
dnsProvider = "porkbun";
|
|
|
|
webroot = null;
|
|
|
|
};
|
2025-01-02 14:47:50 +04:00
|
|
|
};
|
2025-01-02 12:27:19 +04:00
|
|
|
services = {
|
|
|
|
akkoma = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.akkoma;
|
2025-01-02 15:53:53 +04:00
|
|
|
extraPackages =
|
|
|
|
builtins.attrValues { inherit (pkgs) ffmpeg exiftool imagemagick; };
|
2025-01-02 14:47:50 +04:00
|
|
|
frontends = {
|
|
|
|
primary = {
|
|
|
|
package = pkgs.akkoma-frontends.akkoma-fe;
|
|
|
|
name = "akkoma-fe";
|
|
|
|
ref = "stable";
|
|
|
|
};
|
|
|
|
admin = {
|
|
|
|
package = pkgs.akkoma-frontends.admin-fe;
|
|
|
|
name = "admin-fe";
|
|
|
|
ref = "stable";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nginx = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
2025-01-02 14:48:49 +04:00
|
|
|
# recommendedTlsSettings = true;
|
|
|
|
# recommendedOptimisation = true;
|
|
|
|
# recommendedGzipSettings = true;
|
2025-01-02 14:47:50 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
|
|
|
":pleroma" = {
|
|
|
|
":instance" = {
|
|
|
|
name = "v0id";
|
|
|
|
description = "Good ass fediverse instance";
|
|
|
|
email = "sako@sako.lol";
|
|
|
|
registration_open = false;
|
|
|
|
invites_enabled = true;
|
|
|
|
account_activation_required = false;
|
|
|
|
cleanup_attachments = true;
|
|
|
|
allow_relay = true;
|
|
|
|
};
|
2025-01-02 15:34:20 +04:00
|
|
|
":media_proxy" = {
|
|
|
|
enabled = false;
|
2025-01-02 16:02:33 +04:00
|
|
|
# base_url = "media.social.sako.lol";
|
2025-01-02 15:34:20 +04:00
|
|
|
};
|
2025-01-02 14:47:50 +04:00
|
|
|
"Pleroma.Web.Endpoint" = { url.host = "social.sako.lol"; };
|
|
|
|
"Pleroma.Upload" = {
|
2025-01-02 16:02:33 +04:00
|
|
|
base_url = "https://media.social.sako.lol/media";
|
2025-01-02 14:47:50 +04:00
|
|
|
filters = map (pkgs.formats.elixirConf { }).lib.mkRaw [
|
2025-01-02 15:00:09 +04:00
|
|
|
"Pleroma.Upload.Filter.Exiftool.StripMetadata"
|
2025-01-02 14:47:50 +04:00
|
|
|
"Pleroma.Upload.Filter.Dedupe"
|
|
|
|
"Pleroma.Upload.Filter.AnonymizeFilename"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2025-01-02 12:27:19 +04:00
|
|
|
};
|
2025-01-02 15:53:53 +04:00
|
|
|
nginx.virtualHosts = {
|
|
|
|
"media.social.sako.lol" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
2025-01-02 15:55:16 +04:00
|
|
|
locations."/" = { proxyPass = "http://unix:/run/akkoma/socket"; };
|
2025-01-02 15:53:53 +04:00
|
|
|
};
|
|
|
|
};
|
2025-01-02 12:27:19 +04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|