Skip to content

Commit

Permalink
attempt to cache /nix in Nix Shell Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbecich committed May 24, 2022
1 parent 5a5b310 commit 68b08a2
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/nix-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,30 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
# https://github.com/cachix/install-nix-action/issues/56
- run: |
# Create with liberal rights, otherwise cache action will complain
# about permission errors.
sudo mkdir -p /nix/store
sudo chmod -R 777 /nix
- name: Cache nix env take N+1
uses: actions/cache@v2
with:
path: |
# See https://github.com/actions/cache/pull/726
/nix/store/**
# Missing something?
/nix/var/nix/*/*
/nix/var/nix/db/*
/nix/var/nix/db/*/**
!/nix/var/nix/daemon-socket/socket
!/nix/var/nix/userpool/*
!/nix/var/nix/gc.lock
!/nix/var/nix/db/big-lock
!/nix/var/nix/db/reserved
key: ${{ runner.os }}-nix-store

- uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-21.11
Expand Down

0 comments on commit 68b08a2

Please sign in to comment.