nixos-hetzner/forgejo.nix

43 lines
952 B
Nix
Raw Permalink Normal View History

2026-10-08 20:09:33 +02:00
{ pkgs, ... }: {
services.mysql = {
enable = true;
package = pkgs.mysql84;
};
services.forgejo = {
enable = true;
database = {
type = "mysql";
socket = "/run/mysqld/mysqld.sock";
createDatabase = true;
};
settings.service.DISABLE_REGISTRATION = true;
settings.server = {
2026-10-08 22:23:22 +02:00
DOMAIN = "forgejo.cordevelop.com";
ROOT_URL = "https://forgejo.cordevelop.com/";
2026-10-08 20:09:33 +02:00
HTTP_PORT = 3000;
SSH_PORT = 2222;
SSH_LISTEN_PORT = 2222;
START_SSH_SERVER = true;
};
};
2026-10-08 22:23:22 +02:00
security.acme = {
acceptTerms = true;
defaults.email = "freekcordemans@outlook.com";
};
services.nginx.virtualHosts."forgejo.cordevelop.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:3000";
extraConfig = ''
client_max_body_size 512M;
'';
};
};
networking.firewall.allowedTCPPorts = [ 80 443 3000 2222 ];
2026-10-08 20:09:33 +02:00
}