infrastructure/machines/web02/mattermost/default.nix
Tom Hubrecht daea63c97f
All checks were successful
lint / check (push) Successful in 23s
feat(web02): Deploy mattermost on chat.dgnum.eu
2024-10-17 23:39:13 +02:00

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;
};
}