diff options
Diffstat (limited to 'makefu/2configs/backup')
-rw-r--r-- | makefu/2configs/backup/server.nix | 19 | ||||
-rw-r--r-- | makefu/2configs/backup/ssh/gum.pub | 1 | ||||
-rw-r--r-- | makefu/2configs/backup/ssh/latte.pub | 1 | ||||
-rw-r--r-- | makefu/2configs/backup/ssh/nextgum.pub | 1 | ||||
-rw-r--r-- | makefu/2configs/backup/ssh/omo.pub | 1 | ||||
-rw-r--r-- | makefu/2configs/backup/ssh/wbob.pub | 1 | ||||
-rw-r--r-- | makefu/2configs/backup/ssh/x.pub | 1 | ||||
-rw-r--r-- | makefu/2configs/backup/state.nix | 25 |
8 files changed, 0 insertions, 50 deletions
diff --git a/makefu/2configs/backup/server.nix b/makefu/2configs/backup/server.nix deleted file mode 100644 index 26e53b8c3..000000000 --- a/makefu/2configs/backup/server.nix +++ /dev/null @@ -1,19 +0,0 @@ -{lib,config, ... }: -let - hosts = lib.mapAttrsToList (f: _: lib.removeSuffix ".pub" f) (builtins.readDir ./ssh ); -in { - # TODO: for all enabled machines - options = { - makefu.backup.server.repo = lib.mkOption { - type = lib.types.str; - default = "/var/lib/borgbackup"; - }; - }; - config = { - services.borgbackup.repos = lib.genAttrs hosts (host: { - authorizedKeys = [ (builtins.readFile (./ssh + "/${host}.pub") ) ]; - path = "${config.makefu.backup.server.repo}/${host}"; - user = "borg-${host}"; - }) ; - }; -} diff --git a/makefu/2configs/backup/ssh/gum.pub b/makefu/2configs/backup/ssh/gum.pub deleted file mode 100644 index 52d56d956..000000000 --- a/makefu/2configs/backup/ssh/gum.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOUZcfi2SXxCo1if0oU3x9qPK8/O5FmiXy2HFZyTp/P1 makefu@x diff --git a/makefu/2configs/backup/ssh/latte.pub b/makefu/2configs/backup/ssh/latte.pub deleted file mode 100644 index 52d56d956..000000000 --- a/makefu/2configs/backup/ssh/latte.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOUZcfi2SXxCo1if0oU3x9qPK8/O5FmiXy2HFZyTp/P1 makefu@x diff --git a/makefu/2configs/backup/ssh/nextgum.pub b/makefu/2configs/backup/ssh/nextgum.pub deleted file mode 100644 index 52d56d956..000000000 --- a/makefu/2configs/backup/ssh/nextgum.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOUZcfi2SXxCo1if0oU3x9qPK8/O5FmiXy2HFZyTp/P1 makefu@x diff --git a/makefu/2configs/backup/ssh/omo.pub b/makefu/2configs/backup/ssh/omo.pub deleted file mode 100644 index 053b4da87..000000000 --- a/makefu/2configs/backup/ssh/omo.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAtA3XzpjByYQ9uSHQr0dkNUyi6nROjwv1S2IQtUu4pi makefu@x diff --git a/makefu/2configs/backup/ssh/wbob.pub b/makefu/2configs/backup/ssh/wbob.pub deleted file mode 100644 index 52d56d956..000000000 --- a/makefu/2configs/backup/ssh/wbob.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOUZcfi2SXxCo1if0oU3x9qPK8/O5FmiXy2HFZyTp/P1 makefu@x diff --git a/makefu/2configs/backup/ssh/x.pub b/makefu/2configs/backup/ssh/x.pub deleted file mode 100644 index fe894df33..000000000 --- a/makefu/2configs/backup/ssh/x.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBRfhUv9twYbO7tUe2r2LOXEMNxW14GO3Q0RTkUWeMxw makefu@x diff --git a/makefu/2configs/backup/state.nix b/makefu/2configs/backup/state.nix deleted file mode 100644 index 1143708bf..000000000 --- a/makefu/2configs/backup/state.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, ... }: -# back up all state -let - sec = toString <secrets>; - sshkey = sec + "/borg.priv"; - phrase = sec + "/borg.pw"; -in -{ - services.borgbackup.jobs.state = { - repo = "borg-${config.krebs.build.host.name}@backup.makefu.r:."; - paths = config.state; - encryption = { - mode = "repokey"; - passCommand = "cat ${phrase}"; - }; - environment.BORG_RSH = "ssh -i ${sshkey}"; - prune.keep = - { daily = 7; - weekly = 4; - monthly = -1; # Keep at least one archive for each month - }; - compression = "auto,lzma"; - startAt = "daily"; - }; -} |