reformat and restructure
This commit is contained in:
parent
cbb12c73e7
commit
dc6b3805f6
20 changed files with 173 additions and 158 deletions
|
|
@ -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
|
||||
];
|
||||
|
|
|
|||
|
|
@ -14,4 +14,3 @@
|
|||
secrets.accessToken = config.age.secrets.draupnir_access_token.path;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue