chore: apply nix fmt

This commit is contained in:
Rustam Efimov 2026-04-01 09:54:15 +03:00
parent caa6948199
commit e2bd4444d2
No known key found for this signature in database
47 changed files with 274 additions and 187 deletions

View file

@ -7,20 +7,25 @@ let
pgsqlEnable = config.machine.postgresql.enable;
inherit (config.machine.synapse) enable;
in
with lib; mkIf enable {
services.postgresql = with lib; mkIf pgsqlEnable {
ensureUsers = [
{
name = "matrix-synapse";
ensureDBOwnership = true;
}
];
ensureDatabases = [ "matrix-synapse" ];
};
with lib;
mkIf enable {
services.postgresql =
with lib;
mkIf pgsqlEnable {
ensureUsers = [
{
name = "matrix-synapse";
ensureDBOwnership = true;
}
];
ensureDatabases = [ "matrix-synapse" ];
};
services.matrix-synapse.settings.database = {
name = if pgsqlEnable then "psycopg2" else "sqlite3";
args = with lib; mkIf pgsqlEnable {
host = "/run/postgresql";
};
args =
with lib;
mkIf pgsqlEnable {
host = "/run/postgresql";
};
};
}