diff options
author | Janik <80165193+Janik-Haag@users.noreply.github.com> | 2023-11-07 09:46:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-07 09:46:55 +0100 |
commit | 22aa256c6ceab1845b190cbac072bcca3a20daf0 (patch) | |
tree | 7ba8ceb52c9368a54070a0cd0dc8e3e2b055a5d7 /nixos/modules | |
parent | dcd6057e4a14741c2746ba12428f0cb359e23fc6 (diff) | |
parent | 536401e90aa3c74d2f0226f4e55a005dc8f9eac3 (diff) |
Merge pull request #264882 from robryk/resticfix
nixos/restic: fix #264696 and add a regression test
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/backup/restic.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/services/backup/restic.nix b/nixos/modules/services/backup/restic.nix index 49a55d056014..fcdd3082f5a6 100644 --- a/nixos/modules/services/backup/restic.nix +++ b/nixos/modules/services/backup/restic.nix @@ -345,7 +345,7 @@ in } // optionalAttrs (backup.environmentFile != null) { EnvironmentFile = backup.environmentFile; }; - } // optionalAttrs (backup.initialize || backup.dynamicFilesFrom != null || backup.backupPrepareCommand != null) { + } // optionalAttrs (backup.initialize || doBackup || backup.backupPrepareCommand != null) { preStart = '' ${optionalString (backup.backupPrepareCommand != null) '' ${pkgs.writeScript "backupPrepareCommand" backup.backupPrepareCommand} @@ -360,12 +360,12 @@ in ${pkgs.writeScript "dynamicFilesFromScript" backup.dynamicFilesFrom} >> ${filesFromTmpFile} ''} ''; - } // optionalAttrs (backup.dynamicFilesFrom != null || backup.backupCleanupCommand != null) { + } // optionalAttrs (doBackup || backup.backupCleanupCommand != null) { postStop = '' ${optionalString (backup.backupCleanupCommand != null) '' ${pkgs.writeScript "backupCleanupCommand" backup.backupCleanupCommand} ''} - ${optionalString (backup.dynamicFilesFrom != null) '' + ${optionalString doBackup '' rm ${filesFromTmpFile} ''} ''; |