23 lines
433 B
Nix
23 lines
433 B
Nix
{ config, ... }:
|
|
let
|
|
domain = "git.${config.networking.domain}";
|
|
in
|
|
{
|
|
services.forgejo = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
server = {
|
|
DOMAIN = domain;
|
|
ROOT_URL = "https://${domain}";
|
|
};
|
|
};
|
|
};
|
|
|
|
|
|
services.caddy.virtualHosts."git.${config.networking.domain}" = {
|
|
extraConfig = ''
|
|
reverse_proxy localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}
|
|
'';
|
|
};
|
|
}
|