reformat and restructure

This commit is contained in:
XenGi 2026-03-01 15:11:15 +01:00
parent cbb12c73e7
commit dc6b3805f6
Signed by: xengi
SSH key fingerprint: SHA256:dM+fLZGsDvyv6kunjE8bGduL24VsCFB4LEOSdmRHdG0
20 changed files with 173 additions and 158 deletions

View file

@ -5,9 +5,6 @@
../common.nix
../../services/openssh.nix
../../services/prometheus-node.nix
../../services/nginx.nix
./nginx.nix
../../services/prometheus-nginx.nix
./synapse.nix
./draupnir.nix
];

View file

@ -14,4 +14,3 @@
secrets.accessToken = config.age.secrets.draupnir_access_token.path;
};
}

View file

@ -1,32 +0,0 @@
{ config, ... }:
{
services.nginx.virtualHosts."matrix.${config.networking.domain}" = {
default = true;
quic = true;
kTLS = true;
forceSSL = true;
enableACME = true;
locations = {
"/".return = "418 \"🫖\"";
"~ ^(/_matrix|/_synapse/client)" = {
recommendedProxySettings = true;
proxyPass = "http://[::1]:8008";
extraConfig = ''
client_max_body_size 64M;
proxy_set_header X-Request-ID $request_id;
proxy_http_version 1.1;
'';
};
"/_synapse/metrics" = {
proxyPass = "http://[::1]:9009";
recommendedProxySettings = true;
extraConfig = ''
allow 2001:678:760:cccb::14;
allow 195.160.173.14;
deny all;
'';
};
};
};
}

View file

@ -1,6 +1,11 @@
{ config, ... }:
{
imports = [
../../services/nginx.nix
../../services/prometheus-nginx.nix
];
services = {
matrix-synapse = {
enable = true;
@ -62,4 +67,33 @@
enableRegistrationScript = true;
};
};
nginx.virtualHosts."matrix.${config.networking.domain}" = {
default = true;
quic = true;
kTLS = true;
forceSSL = true;
enableACME = true;
locations = {
"/".return = "418 \"🫖\"";
"~ ^(/_matrix|/_synapse/client)" = {
recommendedProxySettings = true;
proxyPass = "http://[::1]:8008";
extraConfig = ''
client_max_body_size 64M;
proxy_set_header X-Request-ID $request_id;
proxy_http_version 1.1;
'';
};
"/_synapse/metrics" = {
proxyPass = "http://[::1]:9009";
recommendedProxySettings = true;
extraConfig = ''
allow 2001:678:760:cccb::14;
allow 195.160.173.14;
deny all;
'';
};
};
};
}