conduit not working

This commit is contained in:
baritone 2025-03-31 00:50:17 +02:00
parent aadea2bf48
commit e6ce4b32c7
3 changed files with 19 additions and 8 deletions

View file

@ -15,7 +15,6 @@
./services/fail2ban.nix ./services/fail2ban.nix
./services/zed.nix # IMPORTANTE ./services/zed.nix # IMPORTANTE
./services/auto-torrent.nix ./services/auto-torrent.nix
./services/conduwuit.nix
./services/misc.nix ./services/misc.nix
./services/website.nix ./services/website.nix

View file

@ -1,6 +1,6 @@
{...}: let {...}: let
port = 6167; port = 6167;
address = "127.0.0.1"; host = "127.0.0.1";
domain = "matrix.spoodythe.one"; domain = "matrix.spoodythe.one";
mb = 1024 * 1024; mb = 1024 * 1024;
max-request-size = 20; max-request-size = 20;
@ -13,8 +13,8 @@ in {
enable = true; enable = true;
settings = { settings = {
global = { global = {
inherit port; port = [port];
inherit address; address = [host];
server_name = domain; server_name = domain;
max_request_size = max-request-size * mb; max_request_size = max-request-size * mb;
}; };
@ -24,14 +24,25 @@ in {
services.nginx.virtualHosts."${domain}" = { services.nginx.virtualHosts."${domain}" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
listen = [
{ port = 443; ssl = true; addr = "0.0.0.0"; }
{ port = 8448; ssl = true; addr = "0.0.0.0"; }
];
locations."/" = { locations."/" = {
proxyPass = "http://${address}:${toString port}"; proxyPass = "http://${host}:${toString port}";
extraConfig = '' extraConfig = ''
client_max_body_size ${max-request-size}M; client_max_body_size ${toString max-request-size}M;
'';
};
locations."/_matrix" = {
proxyPass = "http://${host}:${toString port}";
extraConfig = ''
client_max_body_size ${toString max-request-size}M;
''; '';
}; };
}; };
# Open port so i can access it on my local network # Open port so i can access it on my local network
networking.firewall.allowedTCPPorts = [port]; networking.firewall.allowedTCPPorts = [port 8448];
networking.firewall.allowedUDPPorts = [port 8448];
} }

View file

@ -50,6 +50,7 @@ in {
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
proxyPass = "http://${host}:${toString port}"; proxyPass = "http://${host}:${toString port}";
proxyWebsockets = true;
extraConfig = '' extraConfig = ''
# Websocket support # Websocket support
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
@ -61,7 +62,7 @@ in {
}; };
}; };
# Open port 80 and 443 for reverse proxy # Open ports for local network access
config.networking.firewall.allowedTCPPorts = [port]; config.networking.firewall.allowedTCPPorts = [port];
config.networking.firewall.allowedUDPPorts = [port]; config.networking.firewall.allowedUDPPorts = [port];
} }