clan-infra/modules/web01/gitea.nix

45 lines
1.1 KiB
Nix
Raw Normal View History

2023-07-05 09:13:05 +00:00
{ pkgs, ... }: {
2023-07-04 17:56:58 +00:00
services.postgresql.enable = true;
services.postgresql.package = pkgs.postgresql_14;
services.postgresql.settings = {
max_connections = "300";
shared_buffers = "80MB";
};
services.postgresqlBackup.enable = true;
services.gitea = {
enable = true;
database = {
type = "postgres";
host = "/run/postgresql";
port = 5432;
};
#mailerPasswordFile = config.sops.secrets.gitea-mail.path;
settings.mailer = {
ENABLED = true;
FROM = "gitea@clan.lol";
2023-07-05 10:52:45 +00:00
HOST = "localhost:25";
2023-07-04 17:56:58 +00:00
};
settings.log.LEVEL = "Error";
2023-07-05 10:52:45 +00:00
# TODO: prevent spammers from logging in, before enabling registration
2023-07-04 17:56:58 +00:00
settings.service.DISABLE_REGISTRATION = true;
settings.metrics.ENABLED = true;
settings.server = {
DISABLE_ROUTER_LOG = true;
ROOT_URL = "https://git.clan.lol";
HTTP_PORT = 3002;
DOMAIN = "git.clan.lol";
};
};
services.nginx.virtualHosts."git.clan.lol" = {
forceSSL = true;
enableACME = true;
locations."/".extraConfig = ''
proxy_pass http://localhost:3002;
'';
};
}