diff options
-rw-r--r-- | alpine/Dockerfile | 3 | ||||
-rw-r--r-- | debian/Dockerfile | 3 | ||||
-rwxr-xr-x | files/.profile | 3 |
3 files changed, 0 insertions, 9 deletions
diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 0e42345..1da307a 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile | |||
@@ -40,9 +40,6 @@ RUN nix-env -iA nixpkgs.glibcLocales | |||
40 | 40 | ||
41 | # < Nix context as a volume | 41 | # < Nix context as a volume |
42 | # We want to be able to define /nix/store as a volume | 42 | # We want to be able to define /nix/store as a volume |
43 | # We thus need to "save" the current nix context to be able | ||
44 | # to restore it at startup time | ||
45 | RUN cp -R /nix /home/nixuser/initial-nix | ||
46 | VOLUME ["/nix"] | 43 | VOLUME ["/nix"] |
47 | # Create bash profile | 44 | # Create bash profile |
48 | COPY --chown=nixuser:nixuser files/.profile ${HOME}/.profile | 45 | COPY --chown=nixuser:nixuser files/.profile ${HOME}/.profile |
diff --git a/debian/Dockerfile b/debian/Dockerfile index 90b2e65..7e4eaea 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile | |||
@@ -40,9 +40,6 @@ RUN nix-env -iA nixpkgs.glibcLocales | |||
40 | 40 | ||
41 | # < Nix context as a volume | 41 | # < Nix context as a volume |
42 | # We want to be able to define /nix/store as a volume | 42 | # We want to be able to define /nix/store as a volume |
43 | # We thus need to "save" the current nix context to be able | ||
44 | # to restore it at startup time | ||
45 | RUN cp -R /nix /home/nixuser/initial-nix | ||
46 | VOLUME ["/nix"] | 43 | VOLUME ["/nix"] |
47 | # Create bash profile | 44 | # Create bash profile |
48 | COPY --chown=nixuser:nixuser files/.profile ${HOME}/.profile | 45 | COPY --chown=nixuser:nixuser files/.profile ${HOME}/.profile |
diff --git a/files/.profile b/files/.profile index 68b4473..2fadec2 100755 --- a/files/.profile +++ b/files/.profile | |||
@@ -1,8 +1,5 @@ | |||
1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
2 | 2 | ||
3 | # Copy initial saved nix context if the /nix is empty | ||
4 | [ ! "$(ls -A /nix)" ] && cp -R ~/initial-nix/* /nix/ | ||
5 | |||
6 | # Source nix environment | 3 | # Source nix environment |
7 | nix_profile="/home/nixuser/.nix-profile/etc/profile.d/nix.sh" | 4 | nix_profile="/home/nixuser/.nix-profile/etc/profile.d/nix.sh" |
8 | # shellcheck source=/home/nixuser/.nix-profile/etc/profile.d/nix.sh | 5 | # shellcheck source=/home/nixuser/.nix-profile/etc/profile.d/nix.sh |