From ffcb42f833bd12bf447b1fb7c2389a76fc95637f Mon Sep 17 00:00:00 2001 From: cy Date: Thu, 13 Mar 2025 16:43:34 -0400 Subject: [PATCH] workflow: fix cache for nixos and home --- .github/workflows/build-machines-and-homes.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-machines-and-homes.yml b/.github/workflows/build-machines-and-homes.yml index b15bc22..e7b0492 100644 --- a/.github/workflows/build-machines-and-homes.yml +++ b/.github/workflows/build-machines-and-homes.yml @@ -140,11 +140,12 @@ jobs: nix run github:zhaofengli/attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN" - run: | - nix build -L .#homeConfigurations."${{ matrix.home }}".activationPackage + package=".#homeConfigurations."${{ matrix.home }}".activationPackage" + nix build -L "$package" - name: cache result run: | - derivation="$(nix path-info --derivation "${{ matrix.home }}")" + derivation="$(nix path-info --derivation "$package")" cache="$(nix-store --query --requisites --include-outputs "$derivation")" nix run github:zhaofengli/attic push main --stdin <<< "$cache"