nixos-config/nixos/machines/chungus/gitea.nix
2024-02-24 03:17:50 +01:00

39 lines
866 B
Nix

{ config, lib, pkgs, ... }:
{
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.gogs.httpPort}";
};
};
};
};
services.gitea = {
enable = true;
appName = "git.chungus.private";
package = pkgs.forgejo;
stateDir = "/srv/gitea";
settings = {
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;
};
};
};
# backup.dirs = [ "/srv/gitea" ];
}