defer tls/ssl to hyperserver
This commit is contained in:
parent
f57f9a37f6
commit
5f7cb33867
12 changed files with 50 additions and 82 deletions
45
matrix.nix
45
matrix.nix
|
|
@ -1,6 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
domain = "sondell.org";
|
||||
hostName = "matrix";
|
||||
fqdn = "${hostName}.${domain}";
|
||||
|
|
@ -12,9 +14,8 @@ let
|
|||
add_header Access-Control-Allow-Origin *;
|
||||
return 200 '${builtins.toJSON data}';
|
||||
'';
|
||||
in
|
||||
{
|
||||
#
|
||||
in {
|
||||
#
|
||||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
settings.enable_registration = true;
|
||||
|
|
@ -27,33 +28,29 @@ in
|
|||
type = "http";
|
||||
tls = false;
|
||||
x_forwarded = true;
|
||||
resources = [
|
||||
resources = [
|
||||
{
|
||||
names = [ "client" "federation" ];
|
||||
names = ["client" "federation"];
|
||||
compress = true;
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
initialScript = pkgs.writeText "synapse-init.sql" ''
|
||||
CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse';
|
||||
CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
|
||||
TEMPLATE template0
|
||||
LC_COLLATE = "C"
|
||||
LC_CTYPE = "C";
|
||||
'';
|
||||
};
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
initialScript = pkgs.writeText "synapse-init.sql" ''
|
||||
CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse';
|
||||
CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
|
||||
TEMPLATE template0
|
||||
LC_COLLATE = "C"
|
||||
LC_CTYPE = "C";
|
||||
'';
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
${fqdn} = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
# locations."/".extraConfig = ''
|
||||
# return 404;
|
||||
# '';
|
||||
|
|
@ -66,7 +63,6 @@ services.postgresql = {
|
|||
|
||||
${domain} = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
# locations."/" = {
|
||||
# proxyPass = "http://localhost:8008";
|
||||
# };
|
||||
|
|
@ -83,4 +79,3 @@ services.postgresql = {
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue