diff options
Diffstat (limited to 'hosts/vidhar')
-rw-r--r-- | hosts/vidhar/pgbackrest/default.nix | 14 |
1 files changed, 12 insertions, 2 deletions
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 @@ | |||
1 | { config, flake, ... }: | 1 | { config, flake, flakeInputs, ... }: |
2 | 2 | ||
3 | let | 3 | let |
4 | surtrRepoCfg = flake.nixosConfigurations."surtr".config.services.pgbackrest.settings.surtr; | 4 | surtrRepoCfg = flake.nixosConfigurations."surtr".config.services.pgbackrest.settings.surtr; |
@@ -6,6 +6,8 @@ in { | |||
6 | config = { | 6 | config = { |
7 | services.pgbackrest = { | 7 | services.pgbackrest = { |
8 | enable = true; | 8 | enable = true; |
9 | package = flakeInputs.nixpkgs-stable.legacyPackages.${config.nixpkgs.system}.pgbackrest; | ||
10 | |||
9 | tlsServer = { | 11 | tlsServer = { |
10 | enable = true; | 12 | enable = true; |
11 | 13 | ||
@@ -39,7 +41,7 @@ in { | |||
39 | 41 | ||
40 | "srv01.uniworx.de" = { | 42 | "srv01.uniworx.de" = { |
41 | pg1-host-type = "tls"; | 43 | pg1-host-type = "tls"; |
42 | pg1-host = "srv01.uniworx.de"; | 44 | pg1-host = "2a03:4000:5e:e55::"; |
43 | pg1-host-ca-file = toString ./ca/ca.crt; | 45 | pg1-host-ca-file = toString ./ca/ca.crt; |
44 | pg1-host-cert-file = toString ./ca/vidhar.crt; | 46 | pg1-host-cert-file = toString ./ca/vidhar.crt; |
45 | pg1-host-key-file = config.sops.secrets."pgbackrest.key".path; | 47 | pg1-host-key-file = config.sops.secrets."pgbackrest.key".path; |
@@ -82,6 +84,14 @@ in { | |||
82 | group = "pgbackrest"; | 84 | group = "pgbackrest"; |
83 | timerConfig.OnCalendar = "daily Europe/Berlin"; | 85 | timerConfig.OnCalendar = "daily Europe/Berlin"; |
84 | }; | 86 | }; |
87 | |||
88 | backups."srv01.uniworx.de-daily" = { | ||
89 | stanza = "srv01.uniworx.de"; | ||
90 | repo = "2"; | ||
91 | user = "pgbackrest"; | ||
92 | group = "pgbackrest"; | ||
93 | timerConfig.OnCalendar = "daily Europe/Berlin"; | ||
94 | }; | ||
85 | }; | 95 | }; |
86 | 96 | ||
87 | systemd.tmpfiles.rules = [ | 97 | systemd.tmpfiles.rules = [ |