kommode/gitea: fix backup count

This commit is contained in:
h7x4 2025-09-04 00:02:58 +02:00
parent a803de2b23
commit 470cc451e0
No known key found for this signature in database
GPG Key ID: 9F2F7D8250F35146

View File

@ -199,7 +199,7 @@ in {
cu = prog: "'${lib.getExe' pkgs.coreutils prog}'"; cu = prog: "'${lib.getExe' pkgs.coreutils prog}'";
backupCount = 3; backupCount = 3;
in '' in ''
for file in $(${cu "ls"} -t1 '${cfg.dump.backupDir}' | ${cu "sort"} --reverse | ${cu "tail"} -n+${toString (backupCount - 1)}); do for file in $(${cu "ls"} -t1 '${cfg.dump.backupDir}' | ${cu "sort"} --reverse | ${cu "tail"} -n+${toString (backupCount + 1)}); do
${cu "rm"} "$file" ${cu "rm"} "$file"
done done
''; '';