bicep/matrix/hookshot: add nginx

This commit is contained in:
Daniel Lovbrotte Olsen 2024-10-13 04:45:06 +02:00
parent c1833eb07c
commit da5c959509
1 changed files with 17 additions and 4 deletions

View File

@ -1,5 +1,10 @@
{ config, lib, unstablePkgs, inputs, ... }: { config, lib, unstablePkgs, inputs, ... }:
let
cfg = config.services.matrix-hookshot;
webhookListenAddress = "127.0.0.1";
webhookListenPort = 9000;
in
{ {
imports = [ imports = [
./module.nix ./module.nix
@ -30,18 +35,19 @@
}; };
listeners = [ listeners = [
{ {
bindAddress = "127.0.0.1"; bindAddress = webhookListenAddress;
port = 9000; port = webhookListenPort;
resources = [ resources = [
"webhooks" "webhooks"
"metrics" # "metrics"
"provisioning" # "provisioning"
"widgets" "widgets"
]; ];
} }
]; ];
generic = { generic = {
enabled = true; enabled = true;
outbound = true;
}; };
feeds = { feeds = {
enabled = true; enabled = true;
@ -54,4 +60,11 @@
services.matrix-synapse-next.settings = { services.matrix-synapse-next.settings = {
app_service_config_files = [ config.sops.secrets."matrix/registrations/matrix-hookshot".path ]; 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}";
};
};
} }