dogfood nixcp everywhere

This commit is contained in:
cy 2025-04-01 12:37:10 -04:00
parent 35638117ab
commit 0db4f4c4ab
Signed by: cy
SSH key fingerprint: SHA256:o/geVWV4om1QhUSkKvDQeW/eAihwnjyXkqMwrVdbuts
2 changed files with 7 additions and 14 deletions

View file

@ -76,8 +76,7 @@ jobs:
if: '!cancelled()' if: '!cancelled()'
run: | run: |
package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel" package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
nix profile install git+https://git.cy7.sh/cy/nixcp.git nix run git+https://git.cy7.sh/cy/nixcp.git -- \
nixcp \
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \ --to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
-u https://nix-community.cachix.org \ -u https://nix-community.cachix.org \
-u https://nixcache.cy7.sh \ -u https://nixcache.cy7.sh \
@ -149,8 +148,7 @@ jobs:
if: '!cancelled()' if: '!cancelled()'
run: | run: |
package=".#homeConfigurations."${{ matrix.home }}".activationPackage" package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
nix profile install git+https://git.cy7.sh/cy/nixcp.git nix run git+https://git.cy7.sh/cy/nixcp.git -- \
nixcp \
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \ --to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
-u https://nix-community.cachix.org \ -u https://nix-community.cachix.org \
-u https://nixcache.cy7.sh \ -u https://nixcache.cy7.sh \

View file

@ -64,16 +64,11 @@ jobs:
# https://stackoverflow.com/a/58859404 # https://stackoverflow.com/a/58859404
if: '!cancelled()' if: '!cancelled()'
run: | run: |
derivations=() nix run git+https://git.cy7.sh/cy/nixcp.git -- \
while IFS=$'\n' read derivation; do --to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
derivations+=("$derivation") -u https://nix-community.cachix.org \
done < <(nix path-info --derivation "${{ matrix.package }}") -u https://nixcache.cy7.sh \
"${{ matrix.package }}"
for derivation in "${derivations[@]}"; do
nix copy -j8 \
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
$(nix-store --query --requisites --include-outputs "$derivation")
done
- name: prepare tarball to upload - name: prepare tarball to upload
run: nix run github:nixos/nixpkgs#gnutar hcvf result.tar result run: nix run github:nixos/nixpkgs#gnutar hcvf result.tar result