nixos: services: mealie: use automatic DB setup
All checks were successful
ci/woodpecker/push/check Pipeline was successful
All checks were successful
ci/woodpecker/push/check Pipeline was successful
This commit is contained in:
parent
1dc65a37e7
commit
5b545a28f1
1 changed files with 3 additions and 17 deletions
|
|
@ -38,27 +38,13 @@ in
|
|||
# Make it work with socket auth
|
||||
POSTGRES_URL_OVERRIDE = "postgresql://mealie:@/mealie?host=/run/postgresql";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
mealie = {
|
||||
after = [ "postgresql.service" ];
|
||||
requires = [ "postgresql.service" ];
|
||||
# Automatic PostgreSQL provisioning
|
||||
database = {
|
||||
createLocally = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Set-up database
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "mealie" ];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "mealie";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
my.services.nginx.virtualHosts = {
|
||||
mealie = {
|
||||
inherit (cfg) port;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue