fix: explicitly add nix bin to PATH after sourcing nix.sh in Docker

This commit is contained in:
mozempk
2026-04-23 14:57:03 +02:00
parent 190a7d64f4
commit 2b866d2c8f

View File

@@ -69,7 +69,9 @@ if [[ -n "${NIX_PACKAGES_PREBAKE:-}" ]]; then
curl -fsSL https://nixos.org/nix/install | \
NIX_INSTALLER_TRUST_INSTALLER=1 sh -s -- --no-daemon --no-channel-add
# shellcheck disable=SC1091
. /root/.nix-profile/etc/profile.d/nix.sh
. /root/.nix-profile/etc/profile.d/nix.sh 2>/dev/null || true
# Explicitly add nix to PATH in case the profile script didn't export it
export PATH="/root/.nix-profile/bin:/nix/var/nix/profiles/default/bin:$PATH"
export NIXPKGS_ALLOW_UNFREE=1
echo " nix profile install: ${_NIX_PKGS[*]}"