This commit is contained in:
Joakim Repomaa
2025-02-06 16:22:34 +02:00
committed by Joakim Repomaa
parent 983e313e11
commit 7a24ac5fe6
21 changed files with 233 additions and 193 deletions

View File

@@ -0,0 +1,47 @@
{ config, lib, ... }:
let
domain = "freun.dev";
fqdn = "social.${domain}";
port = 3500;
in
{
services.gotosocial = {
enable = true;
environmentFile = "/var/secrets/gotosocial.env";
settings = {
host = "social.freun.dev";
account-domain = "freun.dev";
protocol = "https";
bind-address = "localhost";
instance-languages = [ "de" "fi" "en" ];
instance-inject-mastodon-version = true;
accounts-registration-open = true;
instance-expose-public-timeline = true;
letsencrypt-enabled = false;
smtp-host = "horologium.uberspace.de";
smtp-port = 587;
smtp-username = "noreply@freun.dev";
smtp-from = "noreply@freun.dev";
inherit port;
};
setupPostgresqlDB = true;
};
modules.webserver.vHosts = {
${domain}.locations = lib.listToAttrs (
lib.map
(path: {
name = "/.well-known/${path}";
value.extraConfig = ''
rewrite ^.*$ https://${fqdn}/.well-known/${path} permanent;
'';
}) [
"host-meta"
"webfinger"
"nodeinfo"
]
);
"${fqdn}".locations."/".proxy = "http://localhost:${toString port}";
};
}