From 63ece951168caf2e68b403b76e628e6894d92d73 Mon Sep 17 00:00:00 2001 From: Paul Bonaud Date: Wed, 5 Feb 2020 09:56:55 +0100 Subject: 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. --- files/.profile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 files/.profile (limited to 'files/.profile') diff --git a/files/.profile b/files/.profile new file mode 100755 index 0000000..68b4473 --- /dev/null +++ b/files/.profile @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# Copy initial saved nix context if the /nix is empty +[ ! "$(ls -A /nix)" ] && cp -R ~/initial-nix/* /nix/ + +# Source nix environment +nix_profile="/home/nixuser/.nix-profile/etc/profile.d/nix.sh" +# shellcheck source=/home/nixuser/.nix-profile/etc/profile.d/nix.sh +[ -e "${nix_profile}" ] && . "${nix_profile}" + +# Propagate UTF8 +# https://github.com/NixOS/nix/issues/599#issuecomment-153885553 +LOCALE_ARCHIVE="$(nix-env --installed --no-name --out-path --query glibc-locales)/lib/locale/locale-archive" +export LOCALE_ARCHIVE -- cgit v1.2.3