This commit is contained in:
ktkk 2025-10-17 19:58:11 +00:00
parent b89303566a
commit f9132abd53
12 changed files with 332 additions and 30 deletions

View file

@ -0,0 +1,44 @@
{ pkgs, config, ... }:
{
services.nginx.virtualHosts.${config.services.forgejo.settings.server.DOMAIN} = {
forceSSL = true;
enableACME = true;
extraConfig = ''
client_max_body_size 512M;
'';
locations."/" = {
proxyPass = "http://${toString config.services.forgejo.settings.server.ROOT_URL}:${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 = "127.0.0.1";
HTTP_PORT = 3000;
};
service.DISABLE_REGISTRATION = true;
actions = {
ENABLED = true;
DEFAULT_ACTIONS_URL = "github";
};
};
};
}