31 lines
636 B
Nix
31 lines
636 B
Nix
{ config, ... }:
|
|
let
|
|
service = config.facts.services.gitea;
|
|
in
|
|
{
|
|
flake.modules.nixos.gitea = {
|
|
services.gitea = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
server = {
|
|
DOMAIN = service.domain;
|
|
ROOT_URL = service.url;
|
|
HTTP_PORT = service.port;
|
|
HTTP_ADDR = service.host;
|
|
|
|
START_SSH_SERVER = false;
|
|
SSH_PORT = 22;
|
|
};
|
|
|
|
service.DISABLE_REGISTRATION = true;
|
|
};
|
|
};
|
|
|
|
services.openssh.settings.AllowUsers = [ "gitea" ];
|
|
|
|
services.caddy.virtualHosts.${service.domain}.extraConfig =
|
|
"reverse_proxy :${toString service.port}";
|
|
};
|
|
}
|