dotfiles/nixos/boxes/bolty/matrix-server.nix

47 lines
1.1 KiB
Nix
Raw Normal View History

2022-12-19 09:09:08 +00:00
{
config,
pkgs,
inputs,
...
}: {
2021-05-31 09:15:44 +01:00
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.matrix-synapse = {
enable = true;
2022-06-04 08:35:58 +01:00
settings = {
server_name = "cyplo.dev";
2022-12-19 09:09:08 +00:00
listeners = [
{
port = 8008;
bind_addresses = ["bolty.cyplo.github.beta.tailscale.net"];
type = "http";
tls = false;
x_forwarded = true;
resources = [
{
names = ["client" "federation"];
compress = false;
}
];
}
];
experimental_features = {spaces_enabled = true;};
2022-06-04 08:35:58 +01:00
enable_registration = false;
2022-07-16 23:18:21 +01:00
suppress_key_server_warning = true;
2022-06-04 08:35:58 +01:00
};
2022-03-10 12:25:23 +00:00
package =
inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".matrix-synapse;
2021-05-31 09:15:44 +01:00
};
2022-12-19 09:09:08 +00:00
networking.firewall.allowedTCPPorts = [8008];
2021-05-31 09:15:44 +01:00
}