From 5ccd556ae43f3a0f538c338ab288d12e9b654cf4 Mon Sep 17 00:00:00 2001 From: Fabian Montero Date: Sun, 5 Jan 2025 01:36:36 -0600 Subject: [PATCH] remove matrix --- sys/platforms/vps/srv/default.nix | 1 - sys/platforms/vps/srv/matrix.nix | 58 ------------------------------- 2 files changed, 59 deletions(-) delete mode 100644 sys/platforms/vps/srv/matrix.nix diff --git a/sys/platforms/vps/srv/default.nix b/sys/platforms/vps/srv/default.nix index 3216ccb..cf7adb0 100644 --- a/sys/platforms/vps/srv/default.nix +++ b/sys/platforms/vps/srv/default.nix @@ -10,7 +10,6 @@ with lib; { ./net.nix ./mediawiki.nix # ./jitsi.nix - # ./matrix.nix currently not being used ./forgejo.nix ./vaultwarden.nix # ./bepasty.nix diff --git a/sys/platforms/vps/srv/matrix.nix b/sys/platforms/vps/srv/matrix.nix deleted file mode 100644 index 44644fd..0000000 --- a/sys/platforms/vps/srv/matrix.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - lib, - pkgs, - config, - flakes, - ... -}: -with lib; let - subdomain = "matrix.posixlycorrect.com"; - baseUrl = "https://${subdomain}"; -in { - # ver https://nixos.org/manual/nixos/stable/#module-services-matrix - services = { - matrix-conduit = { - enable = true; - package = flakes.conduwuit.packages.${pkgs.system}.default; - settings.global = { - address = "::1"; - port = 6167; - allow_encryption = true; - allow_federation = true; - allow_registration = false; - database_backend = "rocksdb"; - server_name = "posixlycorrect.com"; - allow_check_for_updates = true; - new_user_displayname_suffix = ""; - }; - }; - - nginx.virtualHosts = let - clientConfig."m.homeserver".base_url = baseUrl; - serverConfig."m.server" = "${subdomain}:443"; - mkWellKnown = data: '' - default_type application/json; - add_header Access-Control-Allow-Origin *; - return 200 '${builtins.toJSON data}'; - ''; - in { - "posixlycorrect.com" = { - locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig; - locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig; - }; - "${subdomain}" = { - enableACME = true; - forceSSL = true; - extraConfig = '' - proxy_headers_hash_max_size 512; - proxy_headers_hash_bucket_size 128; - ''; - locations."/".extraConfig = '' - return 403; - ''; - locations."/_matrix".proxyPass = "http://[::1]:6167"; - locations."/_synapse/client".proxyPass = "http://[::1]:6167"; - }; - }; - }; -}