add draupnir
This commit is contained in:
parent
9dd5d2ef2e
commit
79c5c57629
5 changed files with 45 additions and 2 deletions
13
README.md
13
README.md
|
|
@ -33,3 +33,16 @@ register_new_matrix_user \
|
|||
--password <YOUR_PASSWORD>
|
||||
```
|
||||
|
||||
# Draupnir
|
||||
|
||||
Remove rate limit for account:
|
||||
|
||||
```bash
|
||||
curl -X DELETE https://matrix.berlin.ccc.de/_synapse/admin/v1/users/@admin:berlin.ccc.de/override_ratelimit
|
||||
```
|
||||
Set rate limit for account:
|
||||
|
||||
```bash
|
||||
curl -X POST -d '{"messages_per_second":0,"burst_count":0}' https://matrix.berlin.ccc.de/_synapse/admin/v1/users/@admin:berlin.ccc.de/override_ratelimit
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
./services/nginx.nix
|
||||
./services/postgres.nix
|
||||
./services/synapse.nix
|
||||
./services/draupnir.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
17
services/draupnir.nix
Normal file
17
services/draupnir.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.draupnir = {
|
||||
enable = false;
|
||||
settings = {
|
||||
homeserverUrl = "https://matrix.berlin.ccc.de";
|
||||
managementRoom = "#moderators:berlin.ccc.de";
|
||||
autojoinOnlyIfManager = true;
|
||||
recordIgnoredInvites = true;
|
||||
roomStateBackingStore.enabled = true;
|
||||
displayReports = true;
|
||||
};
|
||||
secrets.accessToken = config.age.secrets.draupnir_access_token.path;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -20,6 +20,7 @@ in
|
|||
kTLS = true;
|
||||
forceSSL = true;
|
||||
useACMEHost = fqdn;
|
||||
#enableACME = true;
|
||||
locations = {
|
||||
"/.well-known/matrix/client" = {
|
||||
return = "200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.berlin.ccc.de\"}}'";
|
||||
|
|
@ -28,12 +29,22 @@ in
|
|||
add_header Access-Control-Allow-Origin "*";
|
||||
'';
|
||||
};
|
||||
"/" = {
|
||||
"~ ^(/_matrix|/_synapse/client)" {
|
||||
recommendedProxySettings = true;
|
||||
proxyPass = "unix:/run/matrix-synapse.sock";
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Request-ID $request_id;
|
||||
'';
|
||||
};
|
||||
"/" = {
|
||||
return = "418 \"I'm a Teapot!\"";
|
||||
};
|
||||
extraConfig = ''
|
||||
client_max_body_size 64M;
|
||||
'';
|
||||
};
|
||||
extraConfig = ''
|
||||
proxy_http_version 1.1;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ in
|
|||
{
|
||||
path = "/run/matrix-synapse.sock";
|
||||
x_forwarded = true;
|
||||
request_id_header = "X-Request-ID";
|
||||
resources = [
|
||||
{
|
||||
compress = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue