diff --git a/profiles/servers/matrix-synapse.nix b/profiles/servers/matrix-synapse.nix index 06b4c06..fdfe912 100644 --- a/profiles/servers/matrix-synapse.nix +++ b/profiles/servers/matrix-synapse.nix @@ -1,13 +1,7 @@ { pkgs, config, lib, ... }: { - secrets.matrix-secret = { - owner = "matrix-synapse"; - }; - secrets.matrix-pass = { }; - services.matrix-synapse = { enable = true; allow_guest_access = true; - registration_shared_secret = (builtins.readFile config.secrets.matrix-secret.decrypted); listeners = [{ bind_address = "0.0.0.0"; port = 13748; @@ -29,16 +23,7 @@ server_name = "ataraxiadev.com"; }; - services.postgresql = { - 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"; - ''; - }; + services.postgresql.enable = true; users.users.matrix-synapse.name = lib.mkForce "matrix-synapse"; } \ No newline at end of file