From 5ad71cfe84a49fc27ebcf7c810bcced1361a6e6e Mon Sep 17 00:00:00 2001 From: Matt McHenry Date: Fri, 31 Jan 2020 22:06:19 -0500 Subject: [PATCH] fix pruneCmd to use optionals so multi-element list is preserved --- nixos/modules/services/backup/restic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/backup/restic.nix b/nixos/modules/services/backup/restic.nix index e1dccbba7632..2388f1d6ca13 100644 --- a/nixos/modules/services/backup/restic.nix +++ b/nixos/modules/services/backup/restic.nix @@ -166,7 +166,7 @@ in backupPaths = if (backup.dynamicFilesFrom == null) then concatStringsSep " " backup.paths else "--files-from ${filesFromTmpFile}"; - pruneCmd = optional (builtins.length backup.pruneOpts > 0) [ + pruneCmd = optionals (builtins.length backup.pruneOpts > 0) [ ( resticCmd + " forget --prune " + (concatStringsSep " " backup.pruneOpts) ) ( resticCmd + " check" ) ];