chore: apply nix fmt
This commit is contained in:
parent
caa6948199
commit
e2bd4444d2
47 changed files with 274 additions and 187 deletions
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue