From 62b9189f2da7d9b0804f38d564a1efed1e5db0fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 16 Dec 2020 17:07:17 +0100 Subject: [PATCH] Use a profile folder outside of /nix/var --- alpine/Dockerfile | 1 + debian/Dockerfile | 1 + files/.profile | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 5399610..f6ea60c 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -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 \ diff --git a/debian/Dockerfile b/debian/Dockerfile index 52eb820..edc605c 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -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 \ 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" 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" -- 2.41.0