nixos-config/machines/chungus/service-forgejo.nix
2024-10-09 21:27:44 +09:00

47 lines
1 KiB
Nix

{
config,
lib,
pkgs,
...
}:
{
healthchecks.http.forgejjo = {
url = "http://git.chungus.private/explore/repos";
expectedContent = "nixinate";
};
healthchecks.closed.retiolum.ports.forgejo = [ config.services.forgejo.settings.server.HTTP_PORT ];
services.nginx = {
enable = true;
statusPage = true;
virtualHosts = {
"git.chungus.private" = {
extraConfig = ''
allow ${config.tinc.private.subnet};
deny all;
'';
locations."/" = {
proxyPass = "http://localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}";
};
};
};
};
services.forgejo = {
enable = true;
stateDir = "/srv/forgejo";
settings = {
DEFAULT.APP_NAME = "git.chungus.private";
server.ROOT_URL = "http://git.chungus.private/";
server.DOMAIN = "git.chungus.private";
service.DISABLE_REGISTRATION = false;
session.COOKIE_SECURE = false;
log.LEVEL = "Warn";
other = {
SHOW_FOOTER_VERSION = false;
};
};
};
}