34 lines
702 B
Nix
34 lines
702 B
Nix
{ lib, extraInfo, ... }:
|
|
with lib;
|
|
let
|
|
host = extraInfo.woodpeckerURI;
|
|
in {
|
|
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";
|
|
};
|
|
};
|
|
};
|
|
}
|