Skip to content

Commit 3497eec

Browse files
authored
fix: pin Nix installer to specific release URL (v2.28.3) for reproducibility
1 parent 0d22cd4 commit 3497eec

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ RUN mkdir -m 0755 /nix \
3636
USER vscode
3737
WORKDIR /home/vscode
3838

39-
# Single-user Nix install — the variant that works in containers without
40-
# systemd / a running daemon.
41-
RUN curl -fsSL https://nixos.org/nix/install | sh -s -- --no-daemon --no-channel-add
39+
# Single-user Nix install — pinned to a specific release for reproducibility
40+
# and supply-chain safety. Update the version when upgrading Nix.
41+
ARG NIX_VERSION=2.28.3
42+
RUN curl -fsSL "https://releases.nixos.org/nix/nix-${NIX_VERSION}/install" -o /tmp/nix-install \
43+
&& sh /tmp/nix-install --no-daemon --no-channel-add \
44+
&& rm /tmp/nix-install
4245

4346
ENV PATH=/home/vscode/.nix-profile/bin:/home/vscode/.npm-global/bin:$PATH
4447

0 commit comments

Comments
 (0)