borgbackup: add exclude option
This commit is contained in:
@@ -106,6 +106,16 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
options.clan.borgbackup.exclude = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
example = [ "*.pyc" ];
|
||||||
|
default = [];
|
||||||
|
description = ''
|
||||||
|
Directories/Files to exclude from the backup.
|
||||||
|
Use * as a wildcard.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
(lib.mkRemovedOptionModule [
|
(lib.mkRemovedOptionModule [
|
||||||
"clan"
|
"clan"
|
||||||
@@ -129,7 +139,7 @@ in
|
|||||||
paths = lib.unique (
|
paths = lib.unique (
|
||||||
lib.flatten (map (state: state.folders) (lib.attrValues config.clan.core.state))
|
lib.flatten (map (state: state.folders) (lib.attrValues config.clan.core.state))
|
||||||
);
|
);
|
||||||
exclude = [ "*.pyc" ];
|
exclude = cfg.exclude;
|
||||||
repo = dest.repo;
|
repo = dest.repo;
|
||||||
environment.BORG_RSH = dest.rsh;
|
environment.BORG_RSH = dest.rsh;
|
||||||
compression = "auto,zstd";
|
compression = "auto,zstd";
|
||||||
|
|||||||
Reference in New Issue
Block a user