diff options
author | Paul Bonaud <paul.bonaud@fretlink.com> | 2020-02-05 09:56:55 +0100 |
---|---|---|
committer | Paul Bonaud <paul.bonaud@fretlink.com> | 2020-02-05 17:47:22 +0100 |
commit | 63ece951168caf2e68b403b76e628e6894d92d73 (patch) | |
tree | e3abd3690e3c71e164ef03bd7fe6619ef5d4b880 /files/.profile | |
parent | c17ecb7e7616a5b01908cf6d3dde42f5bb090a67 (diff) | |
download | docker-nix-63ece951168caf2e68b403b76e628e6894d92d73.tar.gz docker-nix-63ece951168caf2e68b403b76e628e6894d92d73.tar.zst docker-nix-63ece951168caf2e68b403b76e628e6894d92d73.zip |
volume: change base images to be able to mount /nix/store as volume
These changes will allow the nix store to be mounted as a volume and
still be able to launch a bash console with the correct nix
environment.
Diffstat (limited to 'files/.profile')
-rwxr-xr-x | files/.profile | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/files/.profile b/files/.profile new file mode 100755 index 0000000..68b4473 --- /dev/null +++ b/files/.profile | |||
@@ -0,0 +1,14 @@ | |||
1 | #!/usr/bin/env bash | ||
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 | ||
7 | nix_profile="/home/nixuser/.nix-profile/etc/profile.d/nix.sh" | ||
8 | # shellcheck source=/home/nixuser/.nix-profile/etc/profile.d/nix.sh | ||
9 | [ -e "${nix_profile}" ] && . "${nix_profile}" | ||
10 | |||
11 | # Propagate UTF8 | ||
12 | # https://github.com/NixOS/nix/issues/599#issuecomment-153885553 | ||
13 | LOCALE_ARCHIVE="$(nix-env --installed --no-name --out-path --query glibc-locales)/lib/locale/locale-archive" | ||
14 | export LOCALE_ARCHIVE | ||