test
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) mkOpt mkReverseProxyOpt;
|
||||
cfg = config.${namespace}.services.matrix;
|
||||
@@ -19,10 +24,16 @@ let
|
||||
port = cfg.port;
|
||||
tls = false;
|
||||
x_forwarded = true;
|
||||
bind_addresses = [ "::1" "0.0.0.0" ];
|
||||
bind_addresses = [
|
||||
"::1"
|
||||
"0.0.0.0"
|
||||
];
|
||||
resources = [
|
||||
{
|
||||
names = [ "client" "federation" ];
|
||||
names = [
|
||||
"client"
|
||||
"federation"
|
||||
];
|
||||
compress = false;
|
||||
}
|
||||
];
|
||||
@@ -37,7 +48,7 @@ let
|
||||
issuer = "https://authentik.mjallen.dev/application/o/matrix/";
|
||||
client_id = "KiChwyQn2kMtXU6LU0x3dlCb0jO6VB6e9xsN9NPs"; # TO BE FILLED
|
||||
client_secret = "6XRfNCUayZqnyaMv0QSEeFz98x2y8BkXnDyylmvAbg71YkQVtpEybP6jmPzncpJsx4k5evtziicgu8p9dOa2oADHL6Ao13643VMTsI4BSel1sbIICA2TH755BpB9J39A"; # TO BE FILLED
|
||||
scopes =[
|
||||
scopes = [
|
||||
"openid"
|
||||
"profile"
|
||||
"email"
|
||||
@@ -64,31 +75,31 @@ let
|
||||
cp_max = 10;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# Registration settings
|
||||
enable_registration = false; # Set to true initially to create admin user
|
||||
enable_registration = false; # Set to true initially to create admin user
|
||||
enable_registration_without_verification = false;
|
||||
# registration_shared_secret = "BogieDudie1";
|
||||
|
||||
|
||||
# Media settings
|
||||
max_upload_size = "50M";
|
||||
media_store_path = "/var/lib/matrix-synapse/media";
|
||||
|
||||
|
||||
# Logging
|
||||
# log_config = "/var/lib/matrix-synapse/log_config.yaml";
|
||||
trusted_key_servers = [
|
||||
{
|
||||
server_name = "matrix.org";
|
||||
server_name = "matrix.org";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
users.users.matrix-synapse = {
|
||||
isSystemUser = true;
|
||||
group = "matrix-synapse";
|
||||
};
|
||||
users.groups.matrix-synapse = {};
|
||||
users.groups.matrix-synapse = { };
|
||||
|
||||
services.postgresql = {
|
||||
enable = lib.mkDefault true;
|
||||
@@ -135,19 +146,22 @@ let
|
||||
middlewares = cfg.reverseProxy.middlewares;
|
||||
};
|
||||
|
||||
matrixContainer = (lib.${namespace}.mkContainer {
|
||||
name = "matrix-synapse";
|
||||
localAddress = cfg.localAddress;
|
||||
port = cfg.port;
|
||||
bindMounts = bindMounts;
|
||||
config = matrixConfig;
|
||||
}) { inherit lib; };
|
||||
matrixContainer =
|
||||
(lib.${namespace}.mkContainer {
|
||||
name = "matrix-synapse";
|
||||
localAddress = cfg.localAddress;
|
||||
port = cfg.port;
|
||||
bindMounts = bindMounts;
|
||||
config = matrixConfig;
|
||||
})
|
||||
{ inherit lib; };
|
||||
|
||||
fullConfig = {
|
||||
${namespace}.services.traefik = lib.mkIf cfg.reverseProxy.enable {
|
||||
reverseProxies = [ reverseProxyConfig ];
|
||||
};
|
||||
} // matrixContainer;
|
||||
}
|
||||
// matrixContainer;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
@@ -164,4 +178,4 @@ with lib;
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable fullConfig;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user