Update scripts/nix_bootstrap.sh

This commit is contained in:
2026-01-14 18:04:21 +00:00
parent f63a2ad1e4
commit 142fc76c55

View File

@@ -5,8 +5,9 @@ set -e
echo "Installing Nix package manager..."
# Check if running as root
if [ "$EUID" -eq 0 ]; then
echo "Warning: Running as root. Multi-user installation recommended for non-root users."
if [ "$EUID" -ne 0 ]; then
echo "Error: This script must be run as root" >&2
exit 1
fi
# Install xz-utils if not present (required for decompressing Nix tarball)
@@ -27,7 +28,7 @@ if ! command -v xz &> /dev/null; then
fi
# Download and run the Nix installer (multi-user mode with daemon)
curl -L https://nixos.org/nix/install | sh -s -- --daemon
curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | sh -s -- --daemon
# Source Nix profile
if [ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]; then