Added forgejo service to alexandria

This commit is contained in:
William 2025-01-13 13:44:53 -03:00
parent 2a232f059d
commit 35f5c43399
3 changed files with 64 additions and 34 deletions

View file

@ -0,0 +1,32 @@
{ config, ... }:
let
domain = "git.baduhai.dev";
in
{
services = {
forgejo = {
enable = true;
settings = {
session.COOKIE_SECURE = true;
server = {
PROTOCOL = "http+unix";
DOMAIN = domain;
SSH_DOMAIN = config.networking.domain;
ROOT_URL = "https://${domain}";
OFFLINE_MODE = true; # disable use of CDNs
};
log.LEVEL = "Warn";
mailer.ENABLED = false;
actions.ENABLED = false;
};
};
nginx.virtualHosts.${domain} = {
useACMEHost = "baduhai.dev";
forceSSL = true;
kTLS = true;
locations."/".proxyPass = "http://unix:${config.services.forgejo.settings.server.HTTP_ADDR}:/";
};
};
}