diff --git a/nixos/queen/akkoma.nix b/nixos/queen/akkoma.nix index 74882fe..affcb67 100644 --- a/nixos/queen/akkoma.nix +++ b/nixos/queen/akkoma.nix @@ -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; + }; + }; }; } diff --git a/nixos/queen/gotosocial.nix b/nixos/queen/gotosocial.nix new file mode 100644 index 0000000..3dd4e63 --- /dev/null +++ b/nixos/queen/gotosocial.nix @@ -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"; + }; + }; +} diff --git a/nixos/queen/mail-server.nix b/nixos/queen/mail-server.nix index d498e8b..ba2179c 100644 --- a/nixos/queen/mail-server.nix +++ b/nixos/queen/mail-server.nix @@ -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"; }; } diff --git a/nixos/queen/nextcloud.nix b/nixos/queen/nextcloud.nix index 189c269..20cb0d9 100644 --- a/nixos/queen/nextcloud.nix +++ b/nixos/queen/nextcloud.nix @@ -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