nixos-selfhost/forgejo.nix
2024-03-02 07:56:40 +01:00

43 lines
797 B
Nix

{ config, ... }:
let
domain = "git.glennwso.com";
# derp = "hi";
in
{
services.forgejo = {
enable = true;
settings = {
service = {
# DISABLE_REGISTRATION = true;
};
server = {
ROOT_URL = "https://${domain}/";
LANDING_PAGE = "explore";
};
};
};
services.nginx = {
enable = true;
appendHttpConfig = ''
map $uri $forgejo_access_log {
default 1;
/api/actions/runner.v1.RunnerService/FetchTask 0;
}
'';
};
services.nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:3000/";
# extraConfig = ''
# access_log /var/log/nginx/access.log main if=$forgejo_access_log;
# '';
};
};
}