diff --git a/.github/actions/nix-install-ephemeral/action.yml b/.github/actions/nix-install-ephemeral/action.yml index 9349654947..7edeb02def 100644 --- a/.github/actions/nix-install-ephemeral/action.yml +++ b/.github/actions/nix-install-ephemeral/action.yml @@ -40,11 +40,10 @@ runs: sudo chmod +x /etc/nix/upload-to-cache.sh env: NIX_SIGN_SECRET_KEY: ${{ env.NIX_SIGN_SECRET_KEY }} - - name: Install nix - uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0 + - uses: NixOS/nix-installer-action@d6ef7ecd8f685af89869e5aca0580a33e3e3150c with: - install_url: https://releases.nixos.org/nix/nix-2.32.2/install - extra_nix_config: | + installer-version: 2.33.1 + extra-conf: | substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{ inputs.push-to-cache == 'true' && 'post-build-hook = /etc/nix/upload-to-cache.sh' || '' }} diff --git a/.github/workflows/base-image-nightly.yml b/.github/workflows/base-image-nightly.yml index 36f896e44f..3bd22ab590 100644 --- a/.github/workflows/base-image-nightly.yml +++ b/.github/workflows/base-image-nightly.yml @@ -26,21 +26,13 @@ jobs: with: ref: ${{ github.event.inputs.branch || 'develop' }} - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1 + - name: Install nix (ephemeral) + uses: ./.github/actions/nix-install-ephemeral with: - role-to-assume: ${{ secrets.DEV_AWS_ROLE }} - aws-region: "us-east-1" - output-credentials: true - role-duration-seconds: 7200 - - - name: Install nix - uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 - with: - install_url: https://releases.nixos.org/nix/nix-2.29.1/install - extra_nix_config: | - substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com - trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= + push-to-cache: 'true' + env: + DEV_AWS_ROLE: ${{ secrets.DEV_AWS_ROLE }} + NIX_SIGN_SECRET_KEY: ${{ secrets.NIX_SIGN_SECRET_KEY }} - name: Set execution ID and timestamp run: | diff --git a/.github/workflows/nix-eval.yml b/.github/workflows/nix-eval.yml index cb3f0f2fdc..f5e427ce16 100644 --- a/.github/workflows/nix-eval.yml +++ b/.github/workflows/nix-eval.yml @@ -24,6 +24,15 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + - name: Mount Nix cache disk + uses: useblacksmith/stickydisk@a652394bf1bf95399f406e648482b41fbd25c51f # v1 + with: + key: ${{ github.repository }}-nix-cache-eval-${{ runner.os }} + path: /nix + - name: Remove existing Nix socket + run: | + sudo rm /nix/var/nix/daemon-socket/socket /nix/receipt.json || true + sudo chown root /nix /nix/var /nix/var/nix || true - name: Install nix uses: ./.github/actions/nix-install-ephemeral with: diff --git a/Dockerfile-15 b/Dockerfile-15 index 7ef96c087c..2ed967a71e 100644 --- a/Dockerfile-15 +++ b/Dockerfile-15 @@ -106,7 +106,7 @@ extra-experimental-features = nix-command flakes extra-substituters = https://nix-postgres-artifacts.s3.amazonaws.com extra-trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= EOF -RUN curl -L https://releases.nixos.org/nix/nix-2.32.2/install | sh -s -- --daemon --no-channel-add --yes --nix-extra-conf-file /tmp/extra-nix.conf +RUN curl -L https://releases.nixos.org/nix/nix-2.33.1/install | sh -s -- --daemon --no-channel-add --yes --nix-extra-conf-file /tmp/extra-nix.conf ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin" COPY . /nixpg diff --git a/Dockerfile-17 b/Dockerfile-17 index 1334f07447..075a7bfb65 100644 --- a/Dockerfile-17 +++ b/Dockerfile-17 @@ -108,7 +108,7 @@ extra-experimental-features = nix-command flakes extra-substituters = https://nix-postgres-artifacts.s3.amazonaws.com extra-trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= EOF -RUN curl -L https://releases.nixos.org/nix/nix-2.32.2/install | sh -s -- --daemon --no-channel-add --yes --nix-extra-conf-file /tmp/extra-nix.conf +RUN curl -L https://releases.nixos.org/nix/nix-2.33.1/install | sh -s -- --daemon --no-channel-add --yes --nix-extra-conf-file /tmp/extra-nix.conf ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin" diff --git a/Dockerfile-orioledb-17 b/Dockerfile-orioledb-17 index 78072e03cc..fc9e35b8bf 100644 --- a/Dockerfile-orioledb-17 +++ b/Dockerfile-orioledb-17 @@ -108,7 +108,7 @@ extra-experimental-features = nix-command flakes extra-substituters = https://nix-postgres-artifacts.s3.amazonaws.com extra-trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= EOF -RUN curl -L https://releases.nixos.org/nix/nix-2.32.2/install | sh -s -- --daemon --no-channel-add --yes --nix-extra-conf-file /tmp/extra-nix.conf +RUN curl -L https://releases.nixos.org/nix/nix-2.33.1/install | sh -s -- --daemon --no-channel-add --yes --nix-extra-conf-file /tmp/extra-nix.conf ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin" diff --git a/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh b/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh index aa4be3e20f..c8b45a63b4 100755 --- a/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh +++ b/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh @@ -297,7 +297,7 @@ function initiate_upgrade { --extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" else echo "1.1.1. Installing Nix using the official installer" - sh <(curl -L https://releases.nixos.org/nix/nix-2.32.2/install) --yes --daemon --nix-extra-conf-file /dev/stdin <