41 lines
1.0 KiB
Nix
41 lines
1.0 KiB
Nix
{ den, ... }:
|
|
{
|
|
lux.services._.gitea = den.lib.parametric {
|
|
includes = [
|
|
(
|
|
den.lib.take.exactly({ host }:
|
|
{
|
|
nixos =
|
|
{ config, ... }:
|
|
{
|
|
services.gitea = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
server = {
|
|
DOMAIN = "git.${host.domain}";
|
|
ROOT_URL = "https://git.${host.domain}/";
|
|
HTTP_PORT = 3001;
|
|
HTTP_ADDR = "127.0.0.1";
|
|
|
|
START_SSH_SERVER = false;
|
|
SSH_PORT = 22;
|
|
};
|
|
|
|
service = {
|
|
DISABLE_REGISTRATION = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
services.openssh.settings.AllowUsers = [ "git" ];
|
|
|
|
services.caddy.virtualHosts."git.${host.domain}".extraConfig =
|
|
"reverse_proxy :${toString config.services.gitea.settings.server.HTTP_PORT}";
|
|
};
|
|
}
|
|
))
|
|
];
|
|
};
|
|
}
|