From a45f4132e5902f45545762cceaeffcd8c32359a4 Mon Sep 17 00:00:00 2001 From: cy Date: Fri, 28 Mar 2025 17:36:51 -0400 Subject: [PATCH] workflow: try another cache command cause --all is really all --- .github/workflows/build-machines-and-homes.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-machines-and-homes.yml b/.github/workflows/build-machines-and-homes.yml index 8459ace..2924929 100644 --- a/.github/workflows/build-machines-and-homes.yml +++ b/.github/workflows/build-machines-and-homes.yml @@ -52,6 +52,7 @@ jobs: 'git+https://git.lix.systems/lix-project/lix?ref=refs/tags/2.92.0' -- \ upgrade-nix \ --extra-substituters https://cache.lix.systems --extra-trusted-public-keys "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" + nix --version - name: Sync repository uses: actions/checkout@v4 @@ -64,8 +65,10 @@ jobs: - name: cache if: always() run: | - nix copy --all --to 's3://nixcache?endpoint=s3.cy7.sh' --verbose - nix store sign --store 's3://nixcache?endpoint=s3.cy7.sh' -k /home/runner/cache-priv-key.pem --all + package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel" + nix copy -j8 \ + --to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \ + $(nix path-info --recursive --derivation "$package" |sed 's/\.drv$/.drv^*/') build-homes: strategy: fail-fast: false @@ -102,6 +105,7 @@ jobs: 'git+https://git.lix.systems/lix-project/lix?ref=refs/tags/2.92.0' -- \ upgrade-nix \ --extra-substituters https://cache.lix.systems --extra-trusted-public-keys "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" + nix --version - name: Sync repository uses: actions/checkout@v4 @@ -114,5 +118,7 @@ jobs: - name: cache if: always() run: | - nix copy --all --to 's3://nixcache?endpoint=s3.cy7.sh' --verbose - nix store sign --store 's3://nixcache?endpoint=s3.cy7.sh' -k /home/runner/cache-priv-key.pem --all + package=".#homeConfigurations."${{ matrix.home }}".activationPackage" + nix copy -j8 \ + --to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \ + $(nix path-info --recursive --derivation "$package" |sed 's/\.drv$/.drv^*/')