implement backup cli for borgbackup

This commit is contained in:
lassulus
2023-12-04 17:05:37 +01:00
parent c9e640a74d
commit 83dd430d03
10 changed files with 125 additions and 53 deletions

View File

@@ -3,15 +3,22 @@
options.clanCore.state = lib.mkOption {
default = { };
type = lib.types.attrsOf
(lib.types.submodule ({ name, ... }: {
(lib.types.submodule ({ ... }: {
options = {
folder = lib.mkOption {
type = lib.types.str;
default = name;
folders = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = ''
Folder where state resides in
'';
};
restoreScript = lib.mkOption {
type = lib.types.str;
default = ":";
description = ''
script to restore the service after the state dir was restored from a backup
'';
};
};
}));
};
@@ -32,10 +39,11 @@
script to list backups
'';
};
delete = lib.mkOption {
restore = lib.mkOption {
type = lib.types.str;
description = ''
script to delete a backup
script to restore a backup
should take an optional service name as argument
'';
};
start = lib.mkOption {