NixOS-Config/nixos/queen/postgres.nix
2023-12-17 21:25:08 +01:00

36 lines
586 B
Nix

{
config,
pkgs,
...
}: {
services.postgresql = {
enable = true;
# Ensure the database, user, and permissions always exist
ensureDatabases = [
"nextcloud"
"onlyoffice"
"akkoma"
"gotosocial"
];
ensureUsers = [
{
name = "nextcloud";
ensureDBOwnership = true;
}
{
name = "onlyoffice";
ensureDBOwnership = true;
}
{
name = "akkoma";
ensureDBOwnership = true;
}
{
name = "gotosocial";
ensureDBOwnership = true;
}
];
};
}