Small tweaks, and trying to set up gotosocial

This commit is contained in:
Lillian-Violet 2023-11-27 14:03:06 +01:00
parent 1972d0c880
commit dfe82bfcc0
4 changed files with 86 additions and 24 deletions

View file

@ -22,28 +22,27 @@
nginx = {
enableACME = true;
forceSSL = true;
serverName = "akkoma.gladtherescake.eu";
serverName = "social.gladtherescake.eu";
};
#dist.cookie._secret = config.sops.secrets."releaseCookie".path;
config = {};
# config = {
# ":pleroma".":instance" = {
# name = "GLaDTheresCake Akkoma";
# email = "akkoma@gladtherescake.eu";
# notify_email = "no-reply@akkoma.gladtherescake.eu";
# emails.mailer = {
# enabled = true;
# adapter = "Swoosh.Adapters.Sendmail";
# cmd_path = "sendmail";
# cmd_args = "-N delay,failure,success";
# qmail = true;
# };
# description = "Lillian's Akkoma server!";
# languages = ["en" "nl"];
# registrations_open = true;
# max_pinned_statuses = 10;
# cleanup_attachments = true;
# };
# };
config = {
":pleroma".":instance" = {
name = "GLaDTheresCake Akkoma";
email = "akkoma@gladtherescake.eu";
notify_email = "no-reply@akkoma.gladtherescake.eu";
emails.mailer = {
enabled = true;
adapter = "Swoosh.Adapters.Sendmail";
cmd_path = "sendmail";
cmd_args = "-N delay,failure,success";
qmail = true;
};
description = "Lillian's Akkoma server!";
languages = ["en" "nl"];
registrations_open = true;
max_pinned_statuses = 10;
cleanup_attachments = true;
};
};
};
}

View file

@ -0,0 +1,44 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
users.users.gotosocial.extraGroups = ["virtualMail"];
services.nginx = {
virtualHosts = {
"social.gladtherescake.eu" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:4257";
};
};
};
};
services.gotosocial = {
enable = true;
setupPostgresqlDB = true;
settings = {
application-name = "gotosocial";
host = "social.gladtherescake.eu";
bind-address = "localhost";
port = 4257;
protocol = "https";
storage-local-base-path = "/var/lib/gotosocial/storage";
instance-languages = ["en-gb" "nl"];
media-image-max-size = 41943040;
media-video-max-size = 209715200;
media-description-max-chars = 2000;
smtp-host = "localhost";
smtp-port = 587;
smtp-username = "no-reply@social.gladtherescake.eu";
smtp-password = config.sops.secrets."releaseCookie".path;
smtp-from = "no-reply@social.gladtherescake.eu";
};
};
}

View file

@ -21,7 +21,11 @@
enableImap = true;
enableSubmission = true;
fqdn = "mail.gladtherescake.eu";
domains = ["nextcloud.gladtherescake.eu" "akkoma.gladtherescake.eu"];
domains = [
"nextcloud.gladtherescake.eu"
"akkoma.gladtherescake.eu"
"social.gladtherescake.eu"
];
loginAccounts = {
"no-reply@nextcloud.gladtherescake.eu" = {
@ -30,8 +34,15 @@
"no-reply@akkoma.gladtherescake.eu" = {
hashedPasswordFile = config.sops.secrets."mailpass".path;
};
"no-reply@social.gladtherescake.eu" = {
hashedPasswordFile = config.sops.secrets."mailpass".path;
};
rejectRecipients = ["no-reply@nextcloud.gladtherescake.eu" "no-reply@akkoma.gladtherescake.eu"];
};
rejectRecipients = [
"no-reply@nextcloud.gladtherescake.eu"
"no-reply@akkoma.gladtherescake.eu"
"no-reply@social.gladtherescake.eu"
];
certificateScheme = "acme-nginx";
};
}

View file

@ -117,7 +117,15 @@
};
systemd.services."sops-nix.service" = {
before = ["nextcloud-setup.service" "postgresql.service" "onlyoffice-converter.service" "onlyoffice-docservice.service" "nginx.service" "phpfpm-nextcloud.service" "redis-nextcloud.service"];
before = [
"nextcloud-setup.service"
"postgresql.service"
"onlyoffice-converter.service"
"onlyoffice-docservice.service"
"nginx.service"
"phpfpm-nextcloud.service"
"redis-nextcloud.service"
];
};
# Ensure that postgres is running before running the setup