bicep/matrix/hookshot: add nginx

This commit is contained in:
Daniel Lovbrotte Olsen 2024-10-13 04:45:06 +02:00
parent 4ce65ea8f0
commit 3dcd9f52d6

View File

@ -1,5 +1,10 @@
{ config, lib, unstablePkgs, inputs, ... }:
let
cfg = config.services.matrix-hookshot;
webhookListenAddress = "127.0.0.1";
webhookListenPort = 9000;
in
{
imports = [
./module.nix
@ -30,18 +35,19 @@
};
listeners = [
{
bindAddress = "127.0.0.1";
port = 9000;
bindAddress = webhookListenAddress;
port = webhookListenPort;
resources = [
"webhooks"
"metrics"
"provisioning"
# "metrics"
# "provisioning"
"widgets"
];
}
];
generic = {
enabled = true;
outbound = true;
};
feeds = {
enabled = true;
@ -54,4 +60,11 @@
services.matrix-synapse-next.settings = {
app_service_config_files = [ config.sops.secrets."matrix/registrations/matrix-hookshot".path ];
};
services.nginx.virtualHosts."hookshot.pvv.ntnu.no" = {
enableACME = true;
locations."/" = {
proxyPass = "http://${webhookListenAddress}:${toString webhookListenPort}";
};
};
}