diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2023-03-21 12:43:21 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2023-03-21 12:43:21 +0100 |
commit | ffd7c4837f36bbfa81b1534a0bdd6a0e0194f3b5 (patch) | |
tree | c051a6533d7be857fe12f2df424f268e35a92334 /hosts/vidhar/pgbackrest | |
parent | f65bd5ae49da40eedd4929f17e0dced77a774af9 (diff) | |
download | nixos-ffd7c4837f36bbfa81b1534a0bdd6a0e0194f3b5.tar nixos-ffd7c4837f36bbfa81b1534a0bdd6a0e0194f3b5.tar.gz nixos-ffd7c4837f36bbfa81b1534a0bdd6a0e0194f3b5.tar.bz2 nixos-ffd7c4837f36bbfa81b1534a0bdd6a0e0194f3b5.tar.xz nixos-ffd7c4837f36bbfa81b1534a0bdd6a0e0194f3b5.zip |
vidhar: pgbackrest srv01.uniworx.de
Diffstat (limited to 'hosts/vidhar/pgbackrest')
-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 = [ |