From 26f05a217bbc6211c97fd81dfd467666da870635 Mon Sep 17 00:00:00 2001 From: clerie Date: Tue, 20 Jun 2023 20:35:37 +0200 Subject: [PATCH] modules/backup: allow exclusion of paths --- modules/backup/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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