f8fdf2f704
This PR irons out the last issues with the backup contract and the Restic implementation. I could check it works backing up files to a local folder and to Backblaze on my server.
42 lines
1 KiB
Nix
42 lines
1 KiB
Nix
{ lib, ... }:
|
|
lib.types.submodule {
|
|
freeformType = lib.types.anything;
|
|
|
|
options = {
|
|
user = lib.mkOption {
|
|
description = "Unix user doing the backups.";
|
|
type = lib.types.str;
|
|
};
|
|
|
|
sourceDirectories = lib.mkOption {
|
|
description = "Directories to backup.";
|
|
type = lib.types.nonEmptyListOf lib.types.str;
|
|
};
|
|
|
|
excludePatterns = lib.mkOption {
|
|
description = "Patterns to exclude.";
|
|
type = lib.types.listOf lib.types.str;
|
|
default = [];
|
|
};
|
|
|
|
hooks = lib.mkOption {
|
|
description = "Hooks to run around the backup.";
|
|
default = {};
|
|
type = lib.types.submodule {
|
|
options = {
|
|
before_backup = lib.mkOption {
|
|
description = "Hooks to run before backup";
|
|
type = lib.types.listOf lib.types.str;
|
|
default = [];
|
|
};
|
|
|
|
after_backup = lib.mkOption {
|
|
description = "Hooks to run after backup";
|
|
type = lib.types.listOf lib.types.str;
|
|
default = [];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|