38 lines
682 B
Nix
38 lines
682 B
Nix
let
|
|
host = "chat.dgnum.eu";
|
|
port = 8065;
|
|
in
|
|
|
|
{
|
|
imports = [ ./module.nix ];
|
|
|
|
services.mattermost = {
|
|
enable = true;
|
|
|
|
siteName = "Merle [Discussions ENS]";
|
|
siteUrl = "https://${host}";
|
|
listenAddress = "127.0.0.1:${builtins.toString port}";
|
|
|
|
localDatabaseCreate = false;
|
|
|
|
mutableConfig = true;
|
|
|
|
extraConfig = {
|
|
SqlSettings.DataSource = "postgres:///mattermost?host=/run/postgresql";
|
|
};
|
|
};
|
|
|
|
services.postgresql = {
|
|
ensureDatabases = [ "mattermost" ];
|
|
ensureUsers = [
|
|
{
|
|
name = "mattermost";
|
|
ensureDBOwnership = true;
|
|
}
|
|
];
|
|
};
|
|
|
|
dgn-web.simpleProxies.mattermost = {
|
|
inherit host port;
|
|
};
|
|
}
|