Skip to content

Commit

Permalink
services/matrix: Automatically purge remote media
Browse files Browse the repository at this point in the history
Remote media that has not been acessed in 90 days will be purged.
Sice purging remote media is currently doing enough to free up space,
I'd suggest not purging local media for now (thus setting the retention
to 10 years, thus virtually unlimited).
  • Loading branch information
e1mo committed Mar 25, 2024
1 parent ce7e5de commit 01c85ce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion services/matrix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,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 @@ -147,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 01c85ce

Please sign in to comment.