flake-config/hosts/crayon/git.nix
Squibid cb143193ee
auto commit on build
hosts/crayon/git.nix
2025-11-10 01:52:40 -05:00

36 lines
873 B
Nix

{ config, ... }:
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
in {
services.nginx.virtualHosts.${srv.DOMAIN} = {
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.squi.bid";
ROOT_URL = "https://${srv.DOMAIN}/";
HTTP_PORT = 3000;
};
service = {
ENABLE_CAPTCHA = true;
REGISTER_MANUAL_CONFIRM = true; # all new users must be approved by me
};
ui.DEFAULT_THEME = "gitea-dark";
repository = {
DEFAULT_PUSH_CREATE_PRIVATE = false;
ENABLE_PUSH_CREATE_USER = true;
};
};
};
}