nixos/borgbackup: Add option createCommand

Add an option `service.borgbackup.jobs.<name>.createCommand`
that allows using `borg import-tar` rather than `borg create` to import
an archive.
This commit is contained in:
Artem Sheremet
2025-11-07 15:13:21 +00:00
parent 4818537fe5
commit 628afad9a1
2 changed files with 41 additions and 25 deletions

View File

@@ -98,7 +98,7 @@ in
dumpCommand = pkgs.writeScript "createTarArchive" ''
${lib.getExe pkgs.gnutar} cf - ${dataDir}
'';
dumpCommandProducesTar = true;
createCommand = "import-tar";
repo = localTarRepo;
# Make sure in import-tar mode encryption flags are still respected.
encryption = {