This commit is contained in:
CherryKitten 2024-03-24 19:03:48 +01:00
parent 4eadd91af2
commit de1ec33923
Signed by: sammy
GPG key ID: 98D8F75FB0658276
3 changed files with 59 additions and 0 deletions

View file

@ -37,6 +37,11 @@
wheelNeedsPassword = false; wheelNeedsPassword = false;
keepTerminfo = true; keepTerminfo = true;
}; };
acme = {
acceptTerms = true;
defaults.email = "admin@cherrykitten.dev";
};
}; };
services.fail2ban = { services.fail2ban = {

View file

@ -1,6 +1,7 @@
{ ... }: { { ... }: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./gotosocial.nix
]; ];
networking.hostName = "maine-coon"; networking.hostName = "maine-coon";

View file

@ -0,0 +1,53 @@
{ ... }:
let
bind-address = "127.0.0.1";
host = "cherrykitten.gay";
port = 8553;
in
{
services.gotosocial = {
enable = true;
settings = {
inherit bind-address host port;
application-name = "CherryKitten";
setupPostgresqlDB = true;
landing-page-user = "sammy";
instance-expose-suspended = true;
instance-expose-suspended-web = true;
accounts-registration-open = false;
media-image-max-size = 41943040;
media-video-max-size = 83886080;
media-description-max-chars = 3000;
media-remote-cache-days = 14;
media-emoji-local-max-size = 204800;
media-emoji-remote-max-size = 204800;
statuses-max-chars = 69420;
statuses-cw-max-chars = 200;
statuses-poll-max-options = 10;
statuses-poll-option-max-chars = 150;
statuses-media-max-files = 16;
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.nginx = {
enable = true;
clientMaxBodySize = "40M";
virtualHosts = {
"${host}" = {
enableACME = true;
forceSSL = true;
locations = {
"/" = {
recommendedProxySettings = true;
proxyWebsockets = true;
proxyPass = "http://${bind-address}:${toString port}";
};
};
};
};
};
}