]> git.immae.eu Git - github/fretlink/docker-nix.git/commitdiff
Use a profile folder outside of /nix/var
authorIsmaël Bouya <ismael.bouya@fretlink.com>
Wed, 16 Dec 2020 16:07:17 +0000 (17:07 +0100)
committerIsmaël Bouya <ismael.bouya@fretlink.com>
Wed, 16 Dec 2020 16:07:50 +0000 (17:07 +0100)
alpine/Dockerfile
debian/Dockerfile
files/.profile

index 5399610f89c3ccf7acb7149c86a403d946b49732..f6ea60cb8a9f3de22ce2da80f240482d79d0edc7 100644 (file)
@@ -19,6 +19,7 @@ USER nixuser
 ENV USER=nixuser
 ENV HOME="/home/nixuser"
 ENV NIX_SYSTEM_PATH="/nix/var/nix/profiles/system"
+ENV NIX_PROFILE="$HOME/nix-envs"
 
 RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.xz \
     && tar xJf nix-*-x86_64-linux.tar.xz \
index 52eb8208c5b299dffdf2b166a7e1ec8aef4b62a1..edc605cec4bef52e9ffe653b74a8429edb30e591 100644 (file)
@@ -19,6 +19,7 @@ USER nixuser
 ENV USER=nixuser
 ENV HOME="/home/nixuser"
 ENV NIX_SYSTEM_PATH="/nix/var/nix/profiles/system"
+ENV NIX_PROFILE="$HOME/nix-envs"
 
 RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.xz \
     && tar xJf nix-*-x86_64-linux.tar.xz \
index e705bc02e842d7cdead06bcdd3c00cd87ee033db..80d968e5670ebd46ece9cac66ebf8550358a4fab 100755 (executable)
@@ -10,4 +10,4 @@ nix_profile="$NIX_SYSTEM_PATH/etc/profile.d/nix.sh"
 LOCALE_ARCHIVE="$NIX_SYSTEM_PATH/lib/locale/locale-archive"
 export LOCALE_ARCHIVE
 
-PATH="$PATH:$NIX_SYSTEM_PATH/bin"
+PATH="$NIX_PROFILE/bin:$PATH:$NIX_SYSTEM_PATH/bin"