orginase services

This commit is contained in:
Tristan 2024-02-17 15:50:18 +00:00
parent 7caa83908d
commit e5f9966329
7 changed files with 80 additions and 34 deletions

View file

@ -1,3 +1,7 @@
{config, ...}:
let
cfg = config.services.forgejo;
in
{
services.forgejo = {
enable = true;
@ -5,8 +9,7 @@
lfs.enable = true;
settings = {
server = {
DOMAIN = "git.tristans.cloud";
ROOT_URL = "https://git.tristans.cloud";
ROOT_URL = "https://${cfg.settings.server.DOMAIN}";
};
service = {
DISABLE_REGISTRATION = true;
@ -16,4 +19,9 @@
};
};
};
services.nginx.virtualHosts.${cfg.settings.server.DOMAIN} = {
forceSSL = true;
enableACME = true;
locations."~".proxyPass = "http://localhost:${toString cfg.settings.server.HTTP_PORT}";
};
}