Use restic for backups

Now that I have a working Restic backup server, use that for backups
rather than rsyncing to Synology
This commit is contained in:
Greg Hellings
2025-10-15 00:02:48 -05:00
parent 16e98c44b8
commit 3f587cdf8e
5 changed files with 76 additions and 43 deletions
+18 -1
View File
@@ -9,7 +9,14 @@ let
makeSyncFolders = _: job: {
inherit (job) user;
backupCleanupCommand = lib.optionalString (job.post != "") job.post;
backupPrepareCommand = lib.optionalString (job.pre != "") job.pre;
extraOptions = [
"--insecure-tls"
"--insecure-no-password"
];
initialize = true;
environmentFile = config.age.secrets.restic-env.path;
passwordFile = config.age.secrets.restic-pw.path;
paths = [ job.src ];
pruneOpts = [
@@ -17,7 +24,7 @@ let
"--keep-weekly 5"
"--keep-monthly 12"
];
repository = "rest:nas1.shire-zebra.ts.net:30248/${job.dest}";
repository = "rest:https://nas1.shire-zebra.ts.net:30248/${job.dest}";
};
in
with lib;
@@ -46,6 +53,16 @@ with lib;
default = "root";
description = "User to run backup as - defaults to root";
};
pre = mkOption {
type = types.str;
default = "";
};
post = mkOption {
type = types.str;
default = "";
};
};
}
)