nixos/restic: Use cat config command in pre-start command for repo initialization

check, per upstream recommendation in https://github.com/restic/restic/issues/1690

This is to prevent logs from becoming unwieldy with large repo listings.
This commit is contained in:
Jonathan Davies
2024-05-01 12:50:55 +01:00
parent bcd44e224f
commit 046691a499
+1 -1
View File
@@ -346,7 +346,7 @@ in
${pkgs.writeScript "backupPrepareCommand" backup.backupPrepareCommand}
''}
${optionalString (backup.initialize) ''
${resticCmd} snapshots || ${resticCmd} init
${resticCmd} cat config > /dev/null || ${resticCmd} init
''}
${optionalString (backup.paths != null && backup.paths != []) ''
cat ${pkgs.writeText "staticPaths" (concatStringsSep "\n" backup.paths)} >> ${filesFromTmpFile}