diff --git a/.github/actions/nix-install-ephemeral/action.yml b/.github/actions/nix-install-ephemeral/action.yml index 77da36a708..8984a73002 100644 --- a/.github/actions/nix-install-ephemeral/action.yml +++ b/.github/actions/nix-install-ephemeral/action.yml @@ -41,15 +41,30 @@ runs: sudo chmod +x /etc/nix/upload-to-cache.sh env: NIX_SIGN_SECRET_KEY: ${{ env.NIX_SIGN_SECRET_KEY }} - - uses: NixOS/nix-installer-action@d6ef7ecd8f685af89869e5aca0580a33e3e3150c - with: - installer-version: 2.33.2 - 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' || '' }} - max-jobs = 4 - extra-system-features = kvm + - name: Install Nix + shell: bash + run: | + sudo tee /tmp/nix-extra.conf > /dev/null <<'NIXCONF' + extra-experimental-features = nix-command flakes + 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= + max-jobs = 4 + extra-system-features = kvm + NIXCONF + + if [ "${{ inputs.push-to-cache }}" = "true" ]; then + echo "post-build-hook = /etc/nix/upload-to-cache.sh" | sudo tee -a /tmp/nix-extra.conf > /dev/null + fi + + curl -L https://releases.nixos.org/nix/nix-2.33.4/install | sh -s -- --daemon --yes --nix-extra-conf-file /tmp/nix-extra.conf + + # Add nix to PATH for subsequent steps + echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH" + # Source the daemon profile so nix works in this step too + . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh + - name: Print Nix version + shell: bash + run: nix --version - name: Setup KVM permissions shell: bash run: | diff --git a/.github/actions/nix-install-self-hosted/action.yml b/.github/actions/nix-install-self-hosted/action.yml index 755d366960..005ec14791 100644 --- a/.github/actions/nix-install-self-hosted/action.yml +++ b/.github/actions/nix-install-self-hosted/action.yml @@ -18,6 +18,9 @@ runs: role-session-name: gha-oidc-${{ github.run_id }} role-duration-seconds: ${{ inputs.aws-role-duration }} + - name: Print Nix version + shell: bash + run: nix --version - name: Write creds files shell: bash run: | diff --git a/Dockerfile-15 b/Dockerfile-15 index aec6e83649..2d5212da2a 100644 --- a/Dockerfile-15 +++ b/Dockerfile-15 @@ -27,8 +27,9 @@ 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.33.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.4/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" +RUN nix --version WORKDIR /nixpg COPY . . diff --git a/Dockerfile-17 b/Dockerfile-17 index 121d0557a2..d81728bf80 100644 --- a/Dockerfile-17 +++ b/Dockerfile-17 @@ -27,9 +27,9 @@ 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.33.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.4/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" +RUN nix --version WORKDIR /nixpg COPY . . diff --git a/Dockerfile-multigres b/Dockerfile-multigres index 2549d727a8..48a5e6de04 100644 --- a/Dockerfile-multigres +++ b/Dockerfile-multigres @@ -28,9 +28,9 @@ 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.33.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.4/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" +RUN nix --version WORKDIR /nixpg COPY . . diff --git a/Dockerfile-orioledb-17 b/Dockerfile-orioledb-17 index 3cf7a533bd..c0d539ae2d 100644 --- a/Dockerfile-orioledb-17 +++ b/Dockerfile-orioledb-17 @@ -27,9 +27,9 @@ 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.33.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.4/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" +RUN nix --version WORKDIR /nixpg COPY . . 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 6998376a58..72968fbec8 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.33.2/install) --yes --daemon --nix-extra-conf-file /dev/stdin < /tmp/pg_upgrade-nix-gc.log 2>&1 || true # Determine system architecture diff --git a/ansible/vars.yml b/ansible/vars.yml index a706b52ad2..1b2f62a4e7 100644 --- a/ansible/vars.yml +++ b/ansible/vars.yml @@ -10,9 +10,9 @@ postgres_major: # Full version strings for each major version postgres_release: - postgresorioledb-17: "17.6.0.063-orioledb" - postgres17: "17.6.1.106" - postgres15: "15.14.1.106" + postgresorioledb-17: "17.6.0.064-orioledb" + postgres17: "17.6.1.107" + postgres15: "15.14.1.107" # Non Postgres Extensions pgbouncer_release: 1.25.1 diff --git a/docs/multigres-image.md b/docs/multigres-image.md index 31341163c4..6f78e5b578 100644 --- a/docs/multigres-image.md +++ b/docs/multigres-image.md @@ -108,12 +108,12 @@ extra-substituters = **Important**: Replace `YOUR_USERNAME` with your actual username in the `trusted-users` line. -### Step 2: Install Nix 2.33.1 +### Step 2: Install Nix 2.33.4 -Run the following command to install Nix 2.33.1 (the version used in CI) with the custom configuration: +Run the following command to install Nix 2.33.4 (the version used in CI) with the custom configuration: ```bash -curl -L https://releases.nixos.org/nix/nix-2.33.2/install | sh -s -- --daemon --yes --nix-extra-conf-file ./nix.conf +curl -L https://releases.nixos.org/nix/nix-2.33.4/install | sh -s -- --daemon --yes --nix-extra-conf-file ./nix.conf ``` This will install Nix with our build caches pre-configured, which should eliminate substituter-related errors. diff --git a/ebssurrogate/scripts/qemu-bootstrap-nix.sh b/ebssurrogate/scripts/qemu-bootstrap-nix.sh index 7017040bb7..68ef696c66 100755 --- a/ebssurrogate/scripts/qemu-bootstrap-nix.sh +++ b/ebssurrogate/scripts/qemu-bootstrap-nix.sh @@ -82,13 +82,14 @@ execute_playbook #################### function install_nix() { - sudo su -c "sh <(curl -L https://releases.nixos.org/nix/nix-2.33.2/install) --yes --daemon --nix-extra-conf-file /dev/stdin <