diff --git a/modules/matrix.nix b/modules/matrix.nix new file mode 100644 index 0000000..073de2f --- /dev/null +++ b/modules/matrix.nix @@ -0,0 +1,33 @@ +{ config, lib, pkgs, ... }: + +with lib; +{ + services.matrix-synapse = { + enable = false; + withJemalloc = true; + settings = { + enable_metrics = true; + enable_registration = true; + dynamic_thumbnails = true; + max_upload_size = "100M"; + public_baseurl = "https://matrix.cochrun.xyz/"; + server_name = "cochrun.xyz"; + }; + }; + + services.caddy.virtualHosts = { + "matrix.cochrun.xyz".extraConfig = '' + reverse_proxy localhost:8008 + ''; + }; + + services.matrix-conduit = { + enable = true; + settings = { + global = { + allow_registration = true; + server_name = "cochrun.xyz"; + }; + }; + }; +} diff --git a/systems/dalinar/configuration.nix b/systems/dalinar/configuration.nix index 145e630..99fbaa4 100644 --- a/systems/dalinar/configuration.nix +++ b/systems/dalinar/configuration.nix @@ -8,6 +8,7 @@ ../../modules/servers.nix ../../pkgs/base-packages.nix ../../modules/audiobookshelf.nix + ../../modules/matrix.nix ]; networking.hostName = "dalinar"; # Define your hostname.