Infini-DL360/continuwuity: migrate from conduwuit
This commit is contained in:
parent
47a274f72d
commit
af2418b16c
2 changed files with 4 additions and 6 deletions
|
@ -1,56 +0,0 @@
|
|||
{
|
||||
config,
|
||||
common,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
domain = common.subdomain "matrix";
|
||||
cfg = config.services.conduwuit-vendor;
|
||||
host = "http://localhost:${toString cfg.settings.global.port}";
|
||||
in
|
||||
{
|
||||
persist.directories = [ "/var/lib/private/conduwuit" ];
|
||||
|
||||
services.conduwuit-vendor = {
|
||||
enable = true;
|
||||
package = inputs.conduwuit.packages.x86_64-linux.default;
|
||||
settings = {
|
||||
global = {
|
||||
allow_registration = false;
|
||||
database_backend = "rocksdb";
|
||||
server_name = common.domain;
|
||||
well_known = {
|
||||
client = "https://${domain}";
|
||||
server = "${domain}:443";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 8448 ];
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
${domain} = common.nginx.ssl-inx // {
|
||||
locations."^~ /_matrix" = {
|
||||
proxyPass = host;
|
||||
recommendedProxySettings = false;
|
||||
extraConfig = ''
|
||||
proxy_set_header X-ForwardedFor $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host $host;
|
||||
client_max_body_size 50M;
|
||||
proxy_http_version 1.1;
|
||||
'';
|
||||
};
|
||||
locations."/".return = "302 https://${common.domain}/";
|
||||
extraConfig = ''
|
||||
listen 8448 ssl http2 default_server;
|
||||
listen [::]:8448 ssl http2 default_server;
|
||||
'';
|
||||
};
|
||||
${cfg.settings.global.server_name} = {
|
||||
locations."^~ /.well-known/matrix".proxyPass = host;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue