From dcde299b4508aca3cbf6273c89c3d0a667fb5c85 Mon Sep 17 00:00:00 2001 From: mozempk Date: Thu, 23 Apr 2026 14:54:29 +0200 Subject: [PATCH] fix: pre-create /nix before nix installer in Docker (no sudo available) --- iso/_inner-build-live.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/iso/_inner-build-live.sh b/iso/_inner-build-live.sh index bc8a6bc..63ebf08 100755 --- a/iso/_inner-build-live.sh +++ b/iso/_inner-build-live.sh @@ -61,7 +61,11 @@ if [[ -n "${NIX_PACKAGES_PREBAKE:-}" ]]; then else echo " installing nix (single-user, no-daemon)..." rm -rf /nix ~/.nix-profile ~/.nix-defexpr ~/.nix-channels - curl -fsSL https://nixos.org/nix/install | sh -s -- --no-daemon --no-channel-add + # Pre-create /nix as root so the installer doesn't try 'sudo mkdir' + # (sudo isn't installed in this Docker container). + mkdir -m 0755 -p /nix + 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