postgres: only configure datadir once

This commit is contained in:
Charlotte Van Petegem 2024-08-02 13:43:44 +02:00
parent 7671566751
commit 9d0fa026f0
5 changed files with 6 additions and 9 deletions

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
{
imports = [
@ -16,5 +16,8 @@
./torrents
];
services.postgresql.package = pkgs.postgresql_15;
services.postgresql = {
package = pkgs.postgresql_15;
dataDir = "${config.chvp.dataPrefix}/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}";
};
}