Skip to content

Commit 1ae80af

Browse files
committed
fix: enable stickydisk again with new nix-installer-action
1 parent 9f342c5 commit 1ae80af

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

.github/actions/nix-install-ephemeral/action.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ runs:
4040
sudo chmod +x /etc/nix/upload-to-cache.sh
4141
env:
4242
NIX_SIGN_SECRET_KEY: ${{ env.NIX_SIGN_SECRET_KEY }}
43-
- name: Install nix
44-
uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0
43+
- uses: NixOS/nix-installer-action@d6ef7ecd8f685af89869e5aca0580a33e3e3150c
4544
with:
46-
install_url: https://releases.nixos.org/nix/nix-2.32.2/install
47-
extra_nix_config: |
45+
installer-version: 2.33.1
46+
extra-conf: |
4847
substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com
4948
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
5049
${{ inputs.push-to-cache == 'true' && 'post-build-hook = /etc/nix/upload-to-cache.sh' || '' }}

.github/workflows/nix-eval.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ jobs:
2424
steps:
2525
- name: Checkout Repo
2626
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
27+
- name: Mount Nix cache disk
28+
uses: useblacksmith/stickydisk@a652394bf1bf95399f406e648482b41fbd25c51f # v1
29+
with:
30+
key: ${{ github.repository }}-nix-cache-eval-${{ runner.os }}
31+
path: /nix
32+
- name: Remove existing Nix socket
33+
run: |
34+
sudo rm /nix/var/nix/daemon-socket/socket /nix/receipt.json || true
35+
sudo chown root /nix /nix/var /nix/var/nix || true
2736
- name: Install nix
2837
uses: ./.github/actions/nix-install-ephemeral
2938
with:

0 commit comments

Comments
 (0)