workflow: fix cache for nixos and home

This commit is contained in:
cy 2025-03-13 16:43:34 -04:00
parent 2f7ebbdcaf
commit ffcb42f833
Signed by: cy
SSH key fingerprint: SHA256:o/geVWV4om1QhUSkKvDQeW/eAihwnjyXkqMwrVdbuts

View file

@ -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"