new service! amdl

This commit is contained in:
Reid 2025-05-19 01:15:21 -07:00
parent 5c7720f462
commit 02484c74f5
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
11 changed files with 131 additions and 14 deletions

View file

@ -6,6 +6,10 @@ let
in {
options.modules.services.forgejo = {
enable = mkEnableOption "enable forgejo, a lightweight git server";
port = mkOption {
type = types.int;
default = 3000;
};
domain = mkOption {
type = types.str;
default = "git.reidlab.pink";
@ -26,6 +30,7 @@ in {
INSTALL_LOCK = true;
PASSWORD_HASH_ALGO = "argon2";
PASSWORD_CHECK_PWN = true;
REVERSE_PROXY_TRUSTED_PROXIES = "127.0.0.0/8,::1/128";
};
"ui.meta" = {
AUTHOR = "reidlab";
@ -33,7 +38,8 @@ in {
};
"server" = {
DOMAIN = cfg.domain;
PROTOCOL = "http+unix";
PROTOCOL = "http";
HTTP_PORT = cfg.port;
ROOT_URL = "https://${cfg.domain}/";
};
"repository" = {
@ -60,7 +66,7 @@ in {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://unix:${config.services.forgejo.settings.server.HTTP_ADDR}";
proxyPass = "http://127.0.0.1:${cfg.port}";
extraConfig = ''
client_max_body_size 512M;
'';