X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=files%2F.profile;h=80d968e5670ebd46ece9cac66ebf8550358a4fab;hb=refs%2Fpull%2F9%2Fhead;hp=68b4473c98d213e674a443f9f397bdd293846749;hpb=937d660cdc7b7b82cc6e75641ee6f21ff43e017a;p=github%2Ffretlink%2Fdocker-nix.git diff --git a/files/.profile b/files/.profile index 68b4473..80d968e 100755 --- a/files/.profile +++ b/files/.profile @@ -1,14 +1,13 @@ #!/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 +nix_profile="$NIX_SYSTEM_PATH/etc/profile.d/nix.sh" +# shellcheck source=$NIX_SYSTEM_PATH/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" +LOCALE_ARCHIVE="$NIX_SYSTEM_PATH/lib/locale/locale-archive" export LOCALE_ARCHIVE + +PATH="$NIX_PROFILE/bin:$PATH:$NIX_SYSTEM_PATH/bin"