2024-06-30 00:12:00 +02:00
|
|
|
{ lib, extraInfo, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
host = extraInfo.woodpeckerURI;
|
2024-07-06 09:23:24 +02:00
|
|
|
in
|
|
|
|
{
|
2024-06-30 00:12:00 +02:00
|
|
|
options.server.build.enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
example = false;
|
|
|
|
description = ''
|
|
|
|
Enable the build server stack.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf config.server.build.enable {
|
|
|
|
services.nginx.virtualHosts."${host}" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://localhost:3007";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
woodpecker-server = {
|
|
|
|
enable = true;
|
|
|
|
environment = {
|
|
|
|
WOODPECKER_HOST = "https://${domain}";
|
|
|
|
WOODPECKER_SERVER_ADDR = ":3007";
|
|
|
|
WOODPECKER_OPEN = "true";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|