diff --git a/m/tent/gitea.nix b/m/tent/gitea.nix index 2c5b11f1..dfbe1229 100644 --- a/m/tent/gitea.nix +++ b/m/tent/gitea.nix @@ -54,9 +54,10 @@ WorkingDirectory = cfg.dump.backupDir; }; - # gitea dump does not allow overriding files. Instead dump to stdout with - script = '' - ${exe} dump --type ${cfg.dump.type} --file - >"gitea-dump-$(date +%a).${cfg.dump.type}" + name="gitea-dump-$(date +%a).${cfg.dump.type}" + ${exe} dump --type ${cfg.dump.type} --file - >"$name.tmp" + mv "$name.tmp" "$name" ''; };