workflow: fix

This commit is contained in:
cy 2025-03-13 17:45:59 -04:00
parent 2b5322cb72
commit 8da2d56d6d
Signed by: cy
SSH key fingerprint: SHA256:o/geVWV4om1QhUSkKvDQeW/eAihwnjyXkqMwrVdbuts

View file

@ -69,8 +69,14 @@ jobs:
nix profile install github:zhaofengli/attic nix profile install github:zhaofengli/attic
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN" attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
- run: | - name: build and cache
nix build -L .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel run: |
package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
nix build -L "$package"
derivation="$(nix path-info --derivation "$package")"
cache="$(nix-store --query --requisites --include-outputs "$derivation")"
attic push main --stdin <<< "$cache"
- name: cache result - name: cache result
run: | run: |
@ -141,12 +147,10 @@ jobs:
nix profile install github:zhaofengli/attic nix profile install github:zhaofengli/attic
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN" attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
- run: | - name: build and cache
run: |
package=".#homeConfigurations."${{ matrix.home }}".activationPackage" package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
nix build -L "$package" nix build -L "$package"
- name: cache result
run: |
derivation="$(nix path-info --derivation "$package")" derivation="$(nix path-info --derivation "$package")"
cache="$(nix-store --query --requisites --include-outputs "$derivation")" cache="$(nix-store --query --requisites --include-outputs "$derivation")"
attic push main --stdin <<< "$cache" attic push main --stdin <<< "$cache"