federation working (though not perfect yet, by no means

This commit is contained in:
Grimmauld 2023-12-27 19:09:38 +00:00
parent 8798d16239
commit c3742b7526

View file

@ -12,7 +12,7 @@ let
gitea_host = "git.${root_host}"; gitea_host = "git.${root_host}";
gitea_port = 8081; gitea_port = 8081;
matrix_host = "matrix.${root_host}"; matrix_host = "matrix.${root_host}";
in { in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
@ -88,8 +88,8 @@ host replication all ::1/128 md5
port = 5432; port = 5432;
dbname = "synapse"; dbname = "synapse";
user = "synapse"; user = "synapse";
cp_min = 10; cp_min = 5;
cp_max = 40; cp_max = 10;
client_encoding = "auto"; client_encoding = "auto";
passfile = config.age.secrets.synapse_db_pass_prepared.path; passfile = config.age.secrets.synapse_db_pass_prepared.path;
}; };
@ -214,11 +214,25 @@ host replication all ::1/128 md5
virtualHosts."${root_host}" = { virtualHosts."${root_host}" = {
forceSSL = true; forceSSL = true;
useACMEHost = root_host; useACMEHost = root_host;
# locations."/" = { locations."/" = {
root = "/var/www/grimmauld.duckdns.org"; root = "/var/www/grimmauld.duckdns.org";
# }; };
# locations."/.well-known/matrix/" = { locations."/.well-known/matrix/server" = {
# root = "/var/www/grimmauld.duckdns.org/.well-known/matrix"; ## alias = "/var/www/grimmauld.duckdns.org";
## alias = "/var/www/grimmauld.duckdns.org/.well-known/matrix/server"; # pkgs.writeText "server" ''{"m.server": "${matrix_host}:443"}'';
## alias = matrix_redirect;
return = "200 '{\"m.server\":\"${matrix_host}:443\"}'";
extraConfig = ''
default_type application/json;
add_header Access-Control-Allow-Origin *;
add_header Accept-Ranges bytes;'';
};
# locations."/.well-known/matrix/client" = {
# return = "200 '{\"m.homeserver\": {\"base_url\": \"https://${matrix_host}\"}}'";
# extraConfig = ''
#add_header Access-Control-Allow-Origin *;
#default_type application/json;
#'';
# }; # };
}; };