add draupnir
This commit is contained in:
parent
9dd5d2ef2e
commit
79c5c57629
5 changed files with 45 additions and 2 deletions
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,13 +29,23 @@ 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