add attic back in #1

Merged
ahuston-0 merged 22 commits from feature/attic into main 2025-01-26 13:28:26 -05:00
Showing only changes of commit 9263ddff59 - Show all commits

View File

@ -8,7 +8,7 @@ set -e
# retrieve all paths under 100M
nix_paths=$(nix path-info --json --all --closure-size \
| jq 'map_values(.closureSize | select(. < 1e8)) | to_entries | sort_by(.value)' \
| jq 'map(.key) | join("\n")' | sed 's/\\n/\n/g')
| jq 'map(.key) | join("\n")' | sed -E -e 's/\\n/\n/g;s/^"//g;s/"$//g')
readarray -t nix_path_array < <(echo "$nix_paths")
@ -18,5 +18,5 @@ for((i=0; i < ${#nix_path_array[@]}; i+=batchsize))
do
part=( "${nix_path_array[@]:i:batchsize}" )
attic push "${part[@]}"
attic push nix-cache "${part[@]}"
done