infra/hosts/web02/postgresql.nix
2024-11-18 00:36:31 +00:00

31 lines
511 B
Nix

{
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;
};
}