infra/hosts/web02/postgresql.nix

32 lines
511 B
Nix
Raw Normal View History

2023-09-24 14:36:44 +10:00
{
config,
inputs,
pkgs,
...
}:
{
imports = [
inputs.self.nixosModules.backup
];
services.postgresqlBackup = {
enable = true;
compression = "none";
startAt = "daily";
};
nixCommunity.backup = [
{
name = "postgresql";
after = [ config.systemd.services.postgresqlBackup.name ];
paths = [ config.services.postgresqlBackup.location ];
startAt = "daily";
}
];
services.postgresql = {
enable = true;
package = pkgs.postgresql_17;
};
}