add git hosting

This commit is contained in:
kp2pml30 2025-03-03 06:27:50 +04:00
parent 70e965c63f
commit 778ad87a8a
6 changed files with 55 additions and 25 deletions

22
nix/server/forgejo.nix Normal file
View file

@ -0,0 +1,22 @@
{ config
, pkgs
, lib
, ...
}:
let
cfg = config.kp2pml30.server;
in lib.mkIf cfg.forgejo {
services.forgejo = {
enable = true;
database.type = "postgres";
lfs.enable = true;
settings = {
server = {
DOMAIN = "git.${cfg.hostname}";
ROOT_URL = "https://git.${cfg.hostname}/";
HTTP_PORT = 8002;
};
service.DISABLE_REGISTRATION = true;
};
};
}