nixos/hosts/mystra/forgejo.nix

31 lines
711 B
Nix

{ lib, config, ... }:
let
cfg = config.settings.forgejo;
srv = cfg.settings.server;
in
{
services.nginx.virtualHosts."git.henri-saudubray.fr" = {
forceSSL = true;
enableACME = true;
extraConfig = ''
client_max_body_size 512M;
'';
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
};
services.forgejo = {
enable = true;
database.type = "postgres";
lfs.enable = true;
settings = {
server = {
DOMAIN = "git.henri-saudubray.fr";
ROOT_URL = "https://${srv.DOMAIN}/";
HTTP_PORT = 3000;
SSH_PORT = lib.head config.services.openssh.ports;
};
service.DISABLE_REGISTRATION = true;
};
};
}