frues-clan/machines/beagle/modules/reverse-proxy.nix
Pedro Rey Anca 2d065e2493
Some checks are pending
Flake check / check (push) Waiting to run
Update `flake.lock` / update_lockfile (push) Waiting to run
Migrate Synapse and Mautrix bridges (Whatsapp, Signal and Telegram)
2025-10-30 19:09:10 +01:00

46 lines
976 B
Nix

{ config, ... }:
{
security.acme = {
acceptTerms = true;
defaults.email = "personal+letsencrypt@peprolinbot.com";
};
networking.firewall.allowedTCPPorts = [
80
443
];
services.nginx = {
enable = true;
# Use recommended settings
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = {
"idm.peprolinbot.com" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "https://${config.services.kanidm.serverSettings.bindaddress}";
};
};
"synapse.peprolinbot.com" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://[::1]:8008";
extraConfig = ''
client_max_body_size ${config.services.matrix-synapse.settings.max_upload_size};
'';
};
};
};
};
}