summaryrefslogtreecommitdiff
path: root/hosts/vidhar/borg/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2023-03-13 16:37:36 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2023-03-13 16:37:36 +0100
commit16684ae050766810e7df158f82da3abbb1b2329a (patch)
tree61f276d455cd3057441ff1aab2c71dbed0af03be /hosts/vidhar/borg/default.nix
parent6e820741126c9c8b156cf8f9fe285e96cafb3138 (diff)
downloadnixos-16684ae050766810e7df158f82da3abbb1b2329a.tar
nixos-16684ae050766810e7df158f82da3abbb1b2329a.tar.gz
nixos-16684ae050766810e7df158f82da3abbb1b2329a.tar.bz2
nixos-16684ae050766810e7df158f82da3abbb1b2329a.tar.xz
nixos-16684ae050766810e7df158f82da3abbb1b2329a.zip
borg: uniworx.de
Diffstat (limited to 'hosts/vidhar/borg/default.nix')
-rw-r--r--hosts/vidhar/borg/default.nix23
1 files changed, 17 insertions, 6 deletions
diff --git a/hosts/vidhar/borg/default.nix b/hosts/vidhar/borg/default.nix
index d6d64ec8..9a51b103 100644
--- a/hosts/vidhar/borg/default.nix
+++ b/hosts/vidhar/borg/default.nix
@@ -65,12 +65,23 @@ in {
65 }; 65 };
66 }; 66 };
67 67
68 services.borgbackup.repos.jotnar = { 68 services.borgbackup.repos = {
69 path = "/srv/backup/borg/jotnar"; 69 jotnar = {
70 authorizedKeysAppendOnly = let 70 path = "/srv/backup/borg/jotnar";
71 dir = ./jotnar; 71 authorizedKeysAppendOnly = let
72 toAuthKey = fname: ftype: if ftype != "regular" || !(hasSuffix ".pub" fname) then null else builtins.readFile (dir + "/${fname}"); 72 dir = ./jotnar;
73 in filter (v: v != null) (mapAttrsToList toAuthKey (builtins.readDir dir)); 73 toAuthKey = fname: ftype: if ftype != "regular" || !(hasSuffix ".pub" fname) then null else builtins.readFile (dir + "/${fname}");
74 in filter (v: v != null) (mapAttrsToList toAuthKey (builtins.readDir dir));
75 };
76 "uniworx.de" = {
77 path = "/srv/backups/borg/uniworx.de";
78 authorizedKeys = [
79 (builtins.readFile ./uniworx.de/root.pub)
80 ];
81 authorizedKeysAppendOnly = [
82 (builtins.readFile ./uniworx.de/append.srv01.pub)
83 ];
84 };
74 }; 85 };
75 86
76 # systemd.services."check-borg@${utils.escapeSystemdPath "/srv/backup/borg/jotnar"}" = checkBorgUnit; 87 # systemd.services."check-borg@${utils.escapeSystemdPath "/srv/backup/borg/jotnar"}" = checkBorgUnit;