From ffd7c4837f36bbfa81b1534a0bdd6a0e0194f3b5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 21 Mar 2023 12:43:21 +0100 Subject: vidhar: pgbackrest srv01.uniworx.de --- hosts/vidhar/pgbackrest/default.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'hosts/vidhar') diff --git a/hosts/vidhar/pgbackrest/default.nix b/hosts/vidhar/pgbackrest/default.nix index e3fdc2b5..c3ba603a 100644 --- a/hosts/vidhar/pgbackrest/default.nix +++ b/hosts/vidhar/pgbackrest/default.nix @@ -1,4 +1,4 @@ -{ config, flake, ... }: +{ config, flake, flakeInputs, ... }: let surtrRepoCfg = flake.nixosConfigurations."surtr".config.services.pgbackrest.settings.surtr; @@ -6,6 +6,8 @@ in { config = { services.pgbackrest = { enable = true; + package = flakeInputs.nixpkgs-stable.legacyPackages.${config.nixpkgs.system}.pgbackrest; + tlsServer = { enable = true; @@ -39,7 +41,7 @@ in { "srv01.uniworx.de" = { pg1-host-type = "tls"; - pg1-host = "srv01.uniworx.de"; + pg1-host = "2a03:4000:5e:e55::"; pg1-host-ca-file = toString ./ca/ca.crt; pg1-host-cert-file = toString ./ca/vidhar.crt; pg1-host-key-file = config.sops.secrets."pgbackrest.key".path; @@ -82,6 +84,14 @@ in { group = "pgbackrest"; timerConfig.OnCalendar = "daily Europe/Berlin"; }; + + backups."srv01.uniworx.de-daily" = { + stanza = "srv01.uniworx.de"; + repo = "2"; + user = "pgbackrest"; + group = "pgbackrest"; + timerConfig.OnCalendar = "daily Europe/Berlin"; + }; }; systemd.tmpfiles.rules = [ -- cgit v1.2.3