Skip to content

Commit

Permalink
Merge branch 'matrix-proxy-version'
Browse files Browse the repository at this point in the history
  • Loading branch information
e1mo committed Apr 15, 2024
2 parents 0e35c24 + 01c85ce commit 88d1f73
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions services/matrix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ in {
"synapse/registration_shared_secret".owner = "matrix-synapse";
};

services.nginx.virtualHosts = {
"chat.${baseDomain}" = {
enableACME = true;
forceSSL = true;
services.nginx = {
recommendedProxySettings = true;
virtualHosts = {
"chat.${baseDomain}" = {
enableACME = true;
forceSSL = true;

root = pkgs.element-web.override {
root = pkgs.element-web.override {
# Somewhat duplicate of the stuff in website.nix but I am
# not sure if we absolutely need to dedup this, just out of complexity perspective
conf = {
Expand Down Expand Up @@ -60,6 +62,7 @@ in {
# locations."/_synapse/admin".proxyPass = "http://[::1]:${toString matrixPort}";
};
};
};

services.postgresql = {
enable = true;
Expand All @@ -86,7 +89,6 @@ in {
static-auth-secret-file = config.sops.secrets."coturn_static_auth_secret".path;
};

# TODO: Use media storage volume on prod
services.matrix-synapse = {
enable = true;
plugins = [
Expand Down Expand Up @@ -144,6 +146,12 @@ in {
user_mapping_provider.module = "matrix_synapse_saml_mapper.SamlMappingProvider";
};
password_config.enabled = false;
media_retention = {
# Since clearing remote media does the trick for now when it comes to purging old media
# keeping local media for virtually unlimited time (for now, may change in the future).
local_media_lifetime = "10y";
remote_media_lifetime = "90d";
};
};
extraConfigFiles = let
format = (pkgs.formats.yaml {}).generate;
Expand Down

0 comments on commit 88d1f73

Please sign in to comment.