Infini-DL360/conduwuit: init
This commit is contained in:
parent
4c03224c22
commit
b69ec7b9c1
5 changed files with 216 additions and 1 deletions
50
hosts/Infini-DL360/conduwuit.nix
Normal file
50
hosts/Infini-DL360/conduwuit.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ config, common, inputs, ... }:
|
||||
let
|
||||
domain = common.subdomain "matrix";
|
||||
cfg = config.services.matrix-conduit;
|
||||
host = "http://localhost:${toString cfg.settings.global.port}";
|
||||
in
|
||||
{
|
||||
services.matrix-conduit = {
|
||||
enable = true;
|
||||
dataDir = "/srv/conduit";
|
||||
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 // {
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -6,6 +6,7 @@
|
|||
./web.nix
|
||||
|
||||
private.nixosModules.minecraft-servers
|
||||
./conduwuit.nix
|
||||
./factorio.nix
|
||||
./forgejo.nix
|
||||
./freshrss.nix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue