{ config, pkgs, lib, ... }:

{
    services.misskey = {
        enable = true;

        settings = {
            maxFileSize = 20 * 1024 * 1024;
            port = 8089;
            url = "https://m.ocbwoy3.dev";
            publishTarballInsteadOfProvideRepositoryUrl = false;
        };

        database = {
            # passwordFile = "/private/misskey-db.pw";
            createLocally = true;
        };

        redis = {
            # passwordFile = "/private/misskey-db.pw";
            createLocally = true;
        };

        reverseProxy.webserver.nginx.listen = lib.mkForce [];

    };

    systemd.tmpfiles.rules = [
        "d /misskey 0755 root root -"
    ];
}
