diff options
author | makefu <github@syntax-fehler.de> | 2023-09-09 19:42:08 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2023-09-09 19:42:08 +0200 |
commit | 29d72c898d674d2c18fc0f4a76b5e623de0c3dfe (patch) | |
tree | fc4b0695c986a1cda6f1fbbbcbe716e203c54fa3 /lass/2configs/matrix.nix | |
parent | e157ffa72856e4378aa23b096b2efff233f3cb3d (diff) | |
parent | 083229d0211096daec08673f743ccc45b1d8a0ac (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'lass/2configs/matrix.nix')
-rw-r--r-- | lass/2configs/matrix.nix | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/lass/2configs/matrix.nix b/lass/2configs/matrix.nix deleted file mode 100644 index cdcbe7ab0..000000000 --- a/lass/2configs/matrix.nix +++ /dev/null @@ -1,80 +0,0 @@ -{ config, pkgs, ... }: -with import <stockholm/lib>; -{ - services.matrix-synapse = { - # synapse 1.60.0 errors during startup with: - # https://github.com/matrix-org/synapse/issues/15809 - package = pkgs.matrix-synapse.overrideAttrs (oldAttrs: rec { - version = "1.85.2"; - name = "matrix-synapse-${version}"; - src = pkgs.fetchFromGitHub { - owner = "matrix-org"; - repo = "synapse"; - rev = "v${version}"; - hash = "sha256-pFafBsisBPfpDnFYWcimUuBgfFVPZzLna3yHeqIBAAE="; - }; - cargoDeps = pkgs.rustPlatform.fetchCargoTarball { - inherit src; - name = "matrix-synapse-${version}"; - hash = "sha256-dnno+5Ma0YNYpmj3oZ5UG22uAanKwVT67BwQW+mHoFc="; - }; - doCheck = false; - }); - enable = true; - settings = { - server_name = "lassul.us"; - # registration_shared_secret = "yolo"; - database.name = "sqlite3"; - turn_uris = [ - "turn:turn.matrix.org?transport=udp" - "turn:turn.matrix.org?transport=tcp" - ]; - listeners = [ - { - port = 8008; - bind_addresses = [ "::1" ]; - type = "http"; - tls = false; - x_forwarded = true; - resources = [ - { - names = [ "client" ]; - compress = true; - } - { - names = [ "federation" ]; - compress = false; - } - ]; - } - ]; - }; - }; - services.nginx = { - virtualHosts = { - "lassul.us" = { - locations."= /.well-known/matrix/server".extraConfig = '' - add_header Content-Type application/json; - return 200 '${builtins.toJSON { - "m.server" = "matrix.lassul.us:443"; - }}'; - ''; - locations."= /.well-known/matrix/client".extraConfig = '' - add_header Content-Type application/json; - add_header Access-Control-Allow-Origin *; - return 200 '${builtins.toJSON { - "m.homeserver" = { "base_url" = "https://matrix.lassul.us"; }; - "m.identity_server" = { "base_url" = "https://vector.im"; }; - }}'; - ''; - }; - "matrix.lassul.us" = { - forceSSL = true; - enableACME = true; - locations."/_matrix" = { - proxyPass = "http://[::1]:8008"; - }; - }; - }; - }; -} |