mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
nixos/borgbackup: run compact after prune
This commit is contained in:
parent
692d280b6e
commit
d37ee8222b
1 changed files with 10 additions and 0 deletions
|
@ -66,6 +66,7 @@ let
|
|||
${mkKeepArgs cfg} \
|
||||
${optionalString (cfg.prune.prefix != null) "--glob-archives ${escapeShellArg "${cfg.prune.prefix}*"}"} \
|
||||
$extraPruneArgs
|
||||
borg compact $extraArgs $extraCompactArgs
|
||||
${cfg.postPrune}
|
||||
'');
|
||||
|
||||
|
@ -638,6 +639,15 @@ in {
|
|||
example = "--save-space";
|
||||
};
|
||||
|
||||
extraCompactArgs = mkOption {
|
||||
type = types.str;
|
||||
description = lib.mdDoc ''
|
||||
Additional arguments for {command}`borg compact`.
|
||||
Can also be set at runtime using `$extraCompactArgs`.
|
||||
'';
|
||||
default = "";
|
||||
example = "--cleanup-commits";
|
||||
};
|
||||
};
|
||||
}
|
||||
));
|
||||
|
|
Loading…
Reference in a new issue