]> git.immae.eu Git - github/fretlink/docker-nix.git/blame - files/.profile
volume: change base images to be able to mount /nix/store as volume
[github/fretlink/docker-nix.git] / files / .profile
CommitLineData
63ece951
PB
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
7nix_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
13LOCALE_ARCHIVE="$(nix-env --installed --no-name --out-path --query glibc-locales)/lib/locale/locale-archive"
14export LOCALE_ARCHIVE