mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/restic: add 'backups.package' option to override the restic package (#183028)
This commit is contained in:
parent
2f6dce6bd1
commit
81cd3e229c
2 changed files with 19 additions and 1 deletions
|
@ -222,6 +222,15 @@ in
|
|||
A script that must run after finishing the backup process.
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.restic;
|
||||
defaultText = literalExpression "pkgs.restic";
|
||||
description = ''
|
||||
Restic package to use.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}));
|
||||
default = { };
|
||||
|
@ -254,7 +263,7 @@ in
|
|||
(name: backup:
|
||||
let
|
||||
extraOptions = concatMapStrings (arg: " -o ${arg}") backup.extraOptions;
|
||||
resticCmd = "${pkgs.restic}/bin/restic${extraOptions}";
|
||||
resticCmd = "${backup.package}/bin/restic${extraOptions}";
|
||||
filesFromTmpFile = "/run/restic-backups-${name}/includes";
|
||||
backupPaths =
|
||||
if (backup.dynamicFilesFrom == null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue