{ pkgs, config, flake, flakeInputs, ... }: let nixpkgs-pgbackrest = import (flakeInputs.nixpkgs-pgbackrest.outPath + "/pkgs/top-level") { overlays = [ flake.overlays.libdscp ]; localSystem = config.nixpkgs.system; }; in { config = { services.postgresql = { enable = true; package = pkgs.postgresql_15; }; services.pgbackrest = { settings."vidhar" = { pg1-path = config.services.postgresql.dataDir; repo1-path = "/var/lib/pgbackrest"; repo1-retention-full-type = "time"; repo1-retention-full = 14; repo1-retention-archive = 7; }; backups."vidhar-daily" = { stanza = "vidhar"; repo = "1"; timerConfig.OnCalendar = "daily"; }; }; }; }