55 lines
1.2 KiB
Nix
55 lines
1.2 KiB
Nix
{
|
|
pkgs,
|
|
...
|
|
}: {
|
|
services.mattermost = {
|
|
enable = true;
|
|
listenAddress = ":9609";
|
|
localDatabaseCreate = false;
|
|
mutableConfig = false;
|
|
# package = pkgs.mattermost;
|
|
siteName = "Chat";
|
|
siteUrl = "https://chat.voronind.com";
|
|
statePath = "/var/lib/mattermost";
|
|
plugins = [
|
|
(pkgs.fetchurl rec {
|
|
hash = "sha256-yQGBpBPgXxC+Pm6dHlbwlNEdvn6wg9neSpNNTC4YYAA=";
|
|
url = "https://github.com/mattermost/mattermost-plugin-calls/releases/download/v${version}/mattermost-plugin-calls-v${version}.tar.gz";
|
|
version = "1.2.0";
|
|
})
|
|
];
|
|
extraConfig = {
|
|
SqlSettings = {
|
|
DataSource = "postgres:///mattermost?host=/run/postgresql";
|
|
DriverName = "postgres";
|
|
};
|
|
};
|
|
};
|
|
|
|
services.turn-rs = {
|
|
enable = true;
|
|
settings = {
|
|
auth = {
|
|
static_credentials = {
|
|
mattermost = "mattermost";
|
|
};
|
|
};
|
|
turn = {
|
|
interfaces = [
|
|
{
|
|
bind = "127.0.0.1:3478";
|
|
external = "127.0.0.1:3478";
|
|
transport = "udp";
|
|
}
|
|
{
|
|
bind = "127.0.0.1:3478";
|
|
external = "127.0.0.1:3478";
|
|
transport = "tcp";
|
|
}
|
|
];
|
|
realm = "localhost";
|
|
};
|
|
};
|
|
};
|
|
}
|