fix: explicitly add nix bin to PATH after sourcing nix.sh in Docker
This commit is contained in:
@@ -69,7 +69,9 @@ if [[ -n "${NIX_PACKAGES_PREBAKE:-}" ]]; then
|
|||||||
curl -fsSL https://nixos.org/nix/install | \
|
curl -fsSL https://nixos.org/nix/install | \
|
||||||
NIX_INSTALLER_TRUST_INSTALLER=1 sh -s -- --no-daemon --no-channel-add
|
NIX_INSTALLER_TRUST_INSTALLER=1 sh -s -- --no-daemon --no-channel-add
|
||||||
# shellcheck disable=SC1091
|
# 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
|
export NIXPKGS_ALLOW_UNFREE=1
|
||||||
echo " nix profile install: ${_NIX_PKGS[*]}"
|
echo " nix profile install: ${_NIX_PKGS[*]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user