nixos-config/modules/forgejo/default.nix
2025-10-20 20:08:36 +00:00

44 lines
893 B
Nix

{ pkgs, config, ... }:
{
services.nginx.virtualHosts.${config.services.forgejo.settings.server.DOMAIN} = {
forceSSL = true;
enableACME = true;
extraConfig = ''
client_max_body_size 512M;
'';
locations."/" = {
proxyPass = "http://localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}";
proxyWebsockets = true;
extraConfig = ''
proxy_pass_header Authorization;
'';
};
};
services.forgejo = {
enable = true;
database.type = "postgres";
lfs.enable = true;
settings = {
server = {
DOMAIN = "git.katkak.dev";
ROOT_URL = "https://${config.services.forgejo.settings.server.DOMAIN}/";
HTTP_PORT = 3000;
};
service.DISABLE_REGISTRATION = true;
actions = {
ENABLED = true;
DEFAULT_ACTIONS_URL = "github";
};
};
};
}