diff --git a/modules/backup/default.nix b/modules/backup/default.nix index 8da51aa..559fd59 100644 --- a/modules/backup/default.nix +++ b/modules/backup/default.nix @@ -43,7 +43,7 @@ let restic snapshots || restic init - restic backup ${escapeShellArgs jobOptions.paths} + restic backup ${optionalString (jobOptions.exclude != []) (pkgs.writeText "clerie-backup-${jobName}-${targetName}-excludes" (concatStringsSep "\n" jobOptions.exclude))} ${escapeShellArgs jobOptions.paths} restic check @@ -96,6 +96,10 @@ let paths = mkOption { type = with types; listOf str; }; + exclude = mkOption { + type = with types; listOf str; + default = []; + }; }; }; in