Skip to content

Commit 5a3413c

Browse files
committed
feature: docker: io: nix
1 parent e53aa06 commit 5a3413c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docker/Dockerfile.io

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ RUN apt-get update && apt-get upgrade && apt-get autoremove && \
1919
apt-get update && \
2020
apt-get autoremove && apt-get clean && \
2121
rm -rf /var/lib/apt/lists/* && \
22+
echo "> install nix" && \
23+
useradd -m -s /bin/bash nixuser && \
24+
curl -L https://nixos.org/nix/install | sh -s -- --no-daemon && \
25+
echo "nixuser ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/devuser && \
26+
chmod 0440 /etc/sudoers.d/nixuser && \
27+
su - nixuser -c "curl -L https://nixos.org/nix/install | sh -s -- --no-daemon" && \
28+
mv /home/nixuser/.nix-profile /usr/local/src/nix-profile && \
29+
mv /home/nixuser/.nix-defexpr /usr/local/src/nix-defexpr && \
30+
rm -rf /etc/sudoers.d/nixuser && \
31+
userdel -r nixuser && \
2232
echo "> install nvm" && \
2333
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash && \
2434
mv ~/.nvm /usr/local/src/nvm && \
@@ -79,6 +89,8 @@ ENV cloudcmd_terminal_path=gritty
7989
ENV cloudcmd_open=false
8090
8191
ENV PATH=node_modules/.bin:$PATH
92+
ENV PATH=/usr/local/src/nix/profile/bin:$PATH
93+
ENV NIX_PATH=/usr/local/src/nix/defexpr/channels
8294
8395
ENV BUN_INSTALL_CACHE_DIR=/tmp/bun-cache
8496
ENV DENO_DIR=/tmp/deno-cache

0 commit comments

Comments
 (0)