initial commit

This commit is contained in:
Squibid 2025-11-09 23:51:40 -05:00
commit 4014d5e658
Signed by: squibid
GPG key ID: BECE5684D3C4005D
30 changed files with 911 additions and 0 deletions

32
hosts/crayon/git.nix Normal file
View file

@ -0,0 +1,32 @@
{ 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";
};
};
}