diff --git a/scripts/nix_bootstrap.sh b/scripts/nix_bootstrap.sh index d18601d..ad728d1 100644 --- a/scripts/nix_bootstrap.sh +++ b/scripts/nix_bootstrap.sh @@ -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