dotfiles.nix/nixos/viridian/services/postgresql/default.nix
2024-10-16 04:59:02 +08:00

21 lines
372 B
Nix

{pkgs, ...}: {
services.postgresql = {
enable = true;
package = pkgs.postgresql_15;
settings = {
port = 5432;
};
dataDir = "/var/lib/postgresql/15";
};
environment.persistence."/persist" = {
directories = [
{
directory = "/var/lib/postgresql";
user = "postgres";
group = "postgres";
}
];
};
}