Last active
November 30, 2018 11:01
Revisions
-
colemickens revised this gist
Nov 30, 2018 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,8 +19,9 @@ done # sync "cache-store" to local machine rsync -hiva --progress "root@kix.cluster.lol:${CACHE_PTH}" "${CACHE_PTH}" cd "${CACHE_PTH}" for f1 in *.narinfo; do f2="$(cat "${f1}" | grep StorePath | cut -d' ' -f2)" nix copy --from "${CACHE_STORE}" ${f2} --no-check-sigs done -
colemickens created this gist
Nov 30, 2018 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ #!/usr/bin/env bash set -euo pipefail set -x CACHE_PTH="/tmp/localstore/" CACHE_STORE="file://${CACHE_PTH}" mkdir -p ${CACHE_PTH} export NIX_REMOTE="ssh-ng://root@kix.cluster.lol" # capture all the built paths builtPaths="/nix/store/7ca2vsy9s7qqbimj5a6bblqw7p1jml0x-chromium-dev-72.0.3608.4" #builtPaths="$(nix-build "${@}")" # foreach built path, copy it to the "cache-store" on remote echo "${builtPaths}" | while read -r pth1; do ssh root@kix.cluster.lol \ nix copy "${pth1}" --to "${CACHE_STORE}" done # sync "cache-store" to local machine rsync -hiva --progress "root@kix.cluster.lol:${CACHE_PTH}" "${CACHE_PTH}" # import all from our local cache thing unset NIX_REMOTE nix copy --from "${CACHE_STORE}" --all --no-check-sigs