nixos-config/modules/server/builder.nix

34 lines
702 B
Nix
Raw Normal View History

2024-06-30 00:12:00 +02:00
{ 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";
};
};
};
}