diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/Dockerfile | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/debian/Dockerfile b/debian/Dockerfile index e5d410e..52eb820 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile | |||
@@ -18,17 +18,19 @@ RUN addgroup --gid 30000 --system nixbld \ | |||
18 | USER nixuser | 18 | USER nixuser |
19 | ENV USER=nixuser | 19 | ENV USER=nixuser |
20 | ENV HOME="/home/nixuser" | 20 | ENV HOME="/home/nixuser" |
21 | ENV NIX_SYSTEM_PATH="/nix/var/nix/profiles/system" | ||
21 | 22 | ||
22 | RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.xz \ | 23 | RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.xz \ |
23 | && tar xJf nix-*-x86_64-linux.tar.xz \ | 24 | && tar xJf nix-*-x86_64-linux.tar.xz \ |
24 | && ~/nix-*-x86_64-linux/install \ | 25 | && NIX_PROFILE="$NIX_SYSTEM_PATH" ~/nix-*-x86_64-linux/install \ |
25 | && rm -rf ~/nix-*-* | 26 | && rm -rf ~/nix-*-* |
26 | 27 | ||
27 | ENV ENV="/home/nixuser/.nix-profile/etc/profile.d/nix.sh" | ||
28 | RUN echo ". ${ENV}" >> ${HOME}/.profile | ||
29 | # All subsequent "RUN" will use a login shell | 28 | # All subsequent "RUN" will use a login shell |
30 | SHELL ["/usr/bin/env", "bash", "-l", "-c"] | 29 | SHELL ["/usr/bin/env", "bash", "-l", "-c"] |
31 | 30 | ||
31 | # Create bash profile | ||
32 | COPY --chown=nixuser:nixuser files/.profile ${HOME}/.profile | ||
33 | |||
32 | RUN nix-channel --add https://nixos.org/channels/nixpkgs-19.09-darwin nixpkgs \ | 34 | RUN nix-channel --add https://nixos.org/channels/nixpkgs-19.09-darwin nixpkgs \ |
33 | && nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable \ | 35 | && nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable \ |
34 | && nix-channel --update | 36 | && nix-channel --update |
@@ -36,13 +38,11 @@ RUN nix-channel --add https://nixos.org/channels/nixpkgs-19.09-darwin nixpkgs \ | |||
36 | # Propagate UTF8 | 38 | # Propagate UTF8 |
37 | # https://github.com/NixOS/nix/issues/599#issuecomment-153885553 | 39 | # https://github.com/NixOS/nix/issues/599#issuecomment-153885553 |
38 | # The same is hapenning with stack2nix | 40 | # The same is hapenning with stack2nix |
39 | RUN nix-env -iA nixpkgs.glibcLocales | 41 | RUN nix-env -p "$NIX_SYSTEM_PATH" -iA nixpkgs.glibcLocales |
40 | 42 | ||
41 | # < Nix context as a volume | 43 | # < Nix context as a volume |
42 | # We want to be able to define /nix/store as a volume | 44 | # We want to be able to define /nix/store as a volume |
43 | VOLUME ["/nix"] | 45 | VOLUME ["/nix"] |
44 | # Create bash profile | ||
45 | COPY --chown=nixuser:nixuser files/.profile ${HOME}/.profile | ||
46 | # /> | 46 | # /> |
47 | 47 | ||
48 | # Make sure to use "login" shell when running container | 48 | # Make sure to use "login" shell when running container |