This commit is contained in:
XenGi 2025-12-02 19:36:46 +01:00
parent 63f434567a
commit 04efe82c0a
Signed by: xengi
SSH key fingerprint: SHA256:dM+fLZGsDvyv6kunjE8bGduL24VsCFB4LEOSdmRHdG0
10 changed files with 60 additions and 18 deletions

View file

@ -5,7 +5,7 @@
enable = false;
settings = {
homeserverUrl = "https://matrix.berlin.ccc.de";
managementRoom = "#moderators:berlin.ccc.de";
managementRoom = "!ZYWNuaQBkkenNklCSm:matrix.org"; # #cccb-moderators:berlin.ccc.de
autojoinOnlyIfManager = true;
recordIgnoredInvites = true;
roomStateBackingStore.enabled = true;
@ -14,4 +14,3 @@
secrets.accessToken = config.age.secrets.draupnir_access_token.path;
};
}

View file

@ -1,4 +1,4 @@
{ ... }:
{ config, ... }:
# Dashboards:
# - Synapse: https://github.com/element-hq/synapse/tree/master/contrib/grafana
@ -56,4 +56,3 @@
};
};
}

View file

@ -7,7 +7,12 @@ in
services.nginx = {
enable = true;
package = pkgs.nginxQuic;
resolver.addresses = ["[2606:4700:4700::1111]" "[2620:fe::fe]" "1.1.1.1" "9.9.9.9"];
resolver.addresses = [
"[2606:4700:4700::1111]"
"[2620:fe::fe]"
"1.1.1.1"
"9.9.9.9"
];
statusPage = true; # http://127.0.0.1/nginx_status
sslProtocols = "TLSv1.3";
recommendedTlsSettings = true;
@ -20,6 +25,28 @@ in
kTLS = true;
forceSSL = true;
useACMEHost = fqdn;
listen = [
{
addr = "0.0.0.0";
port = 443;
ssl = true;
}
{
addr = "::";
port = 443;
ssl = true;
}
{
addr = "0.0.0.0";
port = 8448;
ssl = true;
}
{
addr = "::";
port = 8448;
ssl = true;
}
];
locations = {
"/".return = "418 \"I'm a Teapot!\"";
"= /.well-known/matrix/client" = {
@ -29,7 +56,7 @@ in
add_header Access-Control-Allow-Origin "*";
'';
};
"~ ^(/_matrix|/_synapse/client)" {
"~ ^(/_matrix|/_synapse/client)" = {
recommendedProxySettings = true;
proxyPass = "http://[::1]:8008";
extraConfig = ''
@ -42,5 +69,5 @@ in
};
};
security.acme.certs."${fqdn}".reloadServices = ["nginx"];
security.acme.certs."${fqdn}".reloadServices = [ "nginx" ];
}

View file

@ -12,11 +12,11 @@
};
scrapeConfigs = [
{
job_name = "synapse";
job_name = "synapse";
scrape_interval = "15s";
static_configs = [
{
targets = ["[::1]:9009"];
targets = [ "[::1]:9009" ];
}
];
}
@ -63,4 +63,3 @@
];
};
}

View file

@ -25,6 +25,7 @@ in
tls = false;
port = 8008;
bind_addresses = [ "::1" ];
#request_id_header = "X-Request-ID";
resources = [
{
compress = false;
@ -39,10 +40,12 @@ in
type = "metrics";
port = 9009;
bind_addresses = [ "::1" ];
resources = [{
compress = false;
names = [ "metrics" ];
}];
resources = [
{
compress = false;
names = [ "metrics" ];
}
];
}
];
enable_metrics = true;
@ -61,7 +64,7 @@ in
};
};
extraConfigFiles = [
config.age.secrets.matrix-registration-shared-secret.path
config.age.secrets.matrix_registration_shared_secret.path
];
enableRegistrationScript = true;
};