aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@fretlink.com>2020-12-16 17:07:17 +0100
committerIsmaël Bouya <ismael.bouya@fretlink.com>2020-12-16 17:07:50 +0100
commit62b9189f2da7d9b0804f38d564a1efed1e5db0fe (patch)
treeaf9525aa0344afcf089b9abcbfcfd337d33bd96a
parentc33369a9ffa6945cc1928986ae280563d2ec0d85 (diff)
downloaddocker-nix-62b9189f2da7d9b0804f38d564a1efed1e5db0fe.tar.gz
docker-nix-62b9189f2da7d9b0804f38d564a1efed1e5db0fe.tar.zst
docker-nix-62b9189f2da7d9b0804f38d564a1efed1e5db0fe.zip
Use a profile folder outside of /nix/var
-rw-r--r--alpine/Dockerfile1
-rw-r--r--debian/Dockerfile1
-rwxr-xr-xfiles/.profile2
3 files changed, 3 insertions, 1 deletions
diff --git a/alpine/Dockerfile b/alpine/Dockerfile
index 5399610..f6ea60c 100644
--- a/alpine/Dockerfile
+++ b/alpine/Dockerfile
@@ -19,6 +19,7 @@ USER nixuser
19ENV USER=nixuser 19ENV USER=nixuser
20ENV HOME="/home/nixuser" 20ENV HOME="/home/nixuser"
21ENV NIX_SYSTEM_PATH="/nix/var/nix/profiles/system" 21ENV NIX_SYSTEM_PATH="/nix/var/nix/profiles/system"
22ENV NIX_PROFILE="$HOME/nix-envs"
22 23
23RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.xz \ 24RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.xz \
24 && tar xJf nix-*-x86_64-linux.tar.xz \ 25 && tar xJf nix-*-x86_64-linux.tar.xz \
diff --git a/debian/Dockerfile b/debian/Dockerfile
index 52eb820..edc605c 100644
--- a/debian/Dockerfile
+++ b/debian/Dockerfile
@@ -19,6 +19,7 @@ USER nixuser
19ENV USER=nixuser 19ENV USER=nixuser
20ENV HOME="/home/nixuser" 20ENV HOME="/home/nixuser"
21ENV NIX_SYSTEM_PATH="/nix/var/nix/profiles/system" 21ENV NIX_SYSTEM_PATH="/nix/var/nix/profiles/system"
22ENV NIX_PROFILE="$HOME/nix-envs"
22 23
23RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.xz \ 24RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.xz \
24 && tar xJf nix-*-x86_64-linux.tar.xz \ 25 && tar xJf nix-*-x86_64-linux.tar.xz \
diff --git a/files/.profile b/files/.profile
index e705bc0..80d968e 100755
--- a/files/.profile
+++ b/files/.profile
@@ -10,4 +10,4 @@ nix_profile="$NIX_SYSTEM_PATH/etc/profile.d/nix.sh"
10LOCALE_ARCHIVE="$NIX_SYSTEM_PATH/lib/locale/locale-archive" 10LOCALE_ARCHIVE="$NIX_SYSTEM_PATH/lib/locale/locale-archive"
11export LOCALE_ARCHIVE 11export LOCALE_ARCHIVE
12 12
13PATH="$PATH:$NIX_SYSTEM_PATH/bin" 13PATH="$NIX_PROFILE/bin:$PATH:$NIX_SYSTEM_PATH/bin"