26 lines
471 B
Nix
26 lines
471 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
service_configs,
|
|
lib,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
(lib.serviceMountWithZpool "postgresql" service_configs.zpool_ssds [
|
|
config.services.postgresql.dataDir
|
|
])
|
|
];
|
|
|
|
services.postgresql = {
|
|
enable = true;
|
|
package = pkgs.postgresql_16;
|
|
dataDir = service_configs.postgres.dataDir;
|
|
};
|
|
|
|
systemd.tmpfiles.rules = [
|
|
# postgresql requires 0700
|
|
"Z ${config.services.postgresql.dataDir} 0700 postgresql postgresql"
|
|
];
|
|
}
|