]> git.immae.eu Git - github/fretlink/docker-nix.git/blobdiff - files/.profile
Use dedicated system path for nix
[github/fretlink/docker-nix.git] / files / .profile
index 2fadec23bba0e09dd90e119fb8756f5571cd9002..e705bc02e842d7cdead06bcdd3c00cd87ee033db 100755 (executable)
@@ -1,11 +1,13 @@
 #!/usr/bin/env bash
 
 # 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="$PATH:$NIX_SYSTEM_PATH/bin"