feat: add forgejo

This commit is contained in:
Ivan R. 2024-03-12 22:19:52 +05:00
parent 9cdcc9f663
commit 865a7947e1
No known key found for this signature in database
GPG key ID: 56C7BAAE859B302C
2 changed files with 35 additions and 0 deletions

View file

@ -28,6 +28,7 @@
./programs/deluge.nix
./programs/prosody.nix
./programs/yggdrasil.nix
./programs/forgejo.nix
./monitoring/grafana.nix
./monitoring/prometheus.nix

View file

@ -0,0 +1,34 @@
{ config, ... }:
{
services.forgejo = {
enable = true;
settings = {
session.COOKIE_SECURE = true;
server = {
ROOT_URL = "https://git.comfycamp.space";
PROTOCOL = "http+unix";
DOMAIN = "git.comfycamp.space";
};
log.LEVEL = "Warn";
mailer = {
ENABLED = true;
PROTOCOL = "smtps";
SMTP_ADDR = "comfycamp.space";
SMTP_PORT = 465;
USER = "git@comfycamp.space";
};
};
mailerPasswordFile = "/var/lib/secrets/forgejo/mail.txt";
database = {
type = "postgres";
socket = "/run/postgresql";
};
};
services.nginx.virtualHosts."git.comfycamp.space" = {
useACMEHost = "comfycamp.space";
forceSSL = true;
locations."/" = {
proxyPass = "http://unix:${config.services.forgejo.settings.server.HTTP_ADDR}";
};
};
}