nixos: services: mealie: use automatic DB setup
All checks were successful
ci/woodpecker/push/check Pipeline was successful

This commit is contained in:
Bruno BELANYI 2025-05-09 00:02:07 +02:00
parent 1dc65a37e7
commit 5b545a28f1

View file

@ -38,27 +38,13 @@ in
# Make it work with socket auth # Make it work with socket auth
POSTGRES_URL_OVERRIDE = "postgresql://mealie:@/mealie?host=/run/postgresql"; POSTGRES_URL_OVERRIDE = "postgresql://mealie:@/mealie?host=/run/postgresql";
}; };
};
systemd.services = { # Automatic PostgreSQL provisioning
mealie = { database = {
after = [ "postgresql.service" ]; createLocally = true;
requires = [ "postgresql.service" ];
}; };
}; };
# Set-up database
services.postgresql = {
enable = true;
ensureDatabases = [ "mealie" ];
ensureUsers = [
{
name = "mealie";
ensureDBOwnership = true;
}
];
};
my.services.nginx.virtualHosts = { my.services.nginx.virtualHosts = {
mealie = { mealie = {
inherit (cfg) port; inherit (cfg) port;