nix: first updates

This commit is contained in:
dprin 2026-08-09 09:09:48 +02:00
parent 39643701c8
commit 0cadeb1031
10 changed files with 246 additions and 48 deletions

29
modules/forgejo.nix Normal file
View file

@ -0,0 +1,29 @@
{config, ...}: let
cfg = config.services.forgejo;
srv = cfg.settings.server;
in {
services.nginx = {
virtualHosts.${cfg.settings.server.DOMAIN} = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
};
};
services.forgejo = {
enable = true;
database.type = "postgres";
lfs.enable = true;
stateDir = "/var/git";
settings = {
server = {
DOMAIN = "git.yelbakri.dev";
ROOT_URL = "https://${srv.DOMAIN}/";
HTTP_PORT = 3000;
};
service.DISABLE_REGISTRATION = true;
};
};
}