nixos-config/machines/chungus/service-forgejo.nix

46 lines
970 B
Nix
Raw Normal View History

2024-08-29 03:26:04 +02:00
{
config,
lib,
pkgs,
...
}:
2023-07-08 03:15:18 +02:00
{
healthchecks.http.forgejjo = {
url = "http://git.chungus.private/explore/repos";
expectedContent = "nixinate";
};
2023-07-08 03:15:18 +02:00
services.nginx = {
enable = true;
statusPage = true;
virtualHosts = {
"git.chungus.private" = {
extraConfig = ''
allow ${config.tinc.private.subnet};
deny all;
'';
locations."/" = {
2024-05-10 23:18:04 +02:00
proxyPass = "http://localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}";
2023-07-08 03:15:18 +02:00
};
};
};
};
2024-05-08 22:07:30 +02:00
services.forgejo = {
2023-07-08 03:15:18 +02:00
enable = true;
2024-05-08 22:07:30 +02:00
stateDir = "/srv/forgejo";
2023-07-08 03:15:18 +02:00
settings = {
2024-05-08 22:07:30 +02:00
DEFAULT.APP_NAME = "git.chungus.private";
2023-07-08 03:15:18 +02:00
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;
};
};
};
}