complete matrix-synapse
This commit is contained in:
parent
2d8def10a4
commit
23b08cf237
@ -1,13 +1,7 @@
|
|||||||
{ pkgs, config, lib, ... }: {
|
{ pkgs, config, lib, ... }: {
|
||||||
secrets.matrix-secret = {
|
|
||||||
owner = "matrix-synapse";
|
|
||||||
};
|
|
||||||
secrets.matrix-pass = { };
|
|
||||||
|
|
||||||
services.matrix-synapse = {
|
services.matrix-synapse = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allow_guest_access = true;
|
allow_guest_access = true;
|
||||||
registration_shared_secret = (builtins.readFile config.secrets.matrix-secret.decrypted);
|
|
||||||
listeners = [{
|
listeners = [{
|
||||||
bind_address = "0.0.0.0";
|
bind_address = "0.0.0.0";
|
||||||
port = 13748;
|
port = 13748;
|
||||||
@ -29,16 +23,7 @@
|
|||||||
server_name = "ataraxiadev.com";
|
server_name = "ataraxiadev.com";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.postgresql = {
|
services.postgresql.enable = true;
|
||||||
enable = true;
|
|
||||||
initialScript = pkgs.writeText "synapse-init.sql" ''
|
|
||||||
CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD '${builtins.readFile config.secrets.matrix-pass.decrypted}';
|
|
||||||
CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
|
|
||||||
TEMPLATE template0
|
|
||||||
LC_COLLATE = "C"
|
|
||||||
LC_CTYPE = "C";
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.matrix-synapse.name = lib.mkForce "matrix-synapse";
|
users.users.matrix-synapse.name = lib.mkForce "matrix-synapse";
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user