Last active
February 2, 2024 13:24
-
-
Save pascualmg/d22b31369957efe72d947abd5f2ab1df to your computer and use it in GitHub Desktop.
Revisions
-
pascualmg renamed this gist
Feb 2, 2024 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
pascualmg created this gist
Feb 2, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ #!/bin/bash if ! command -v curl >/dev/null 2>&1 then echo "Curl no está instalado. Intentando instalar..." # Intenta instalar Curl sudo apt-get install curl fi # Verificar si Nix está instalado if command -v nix >/dev/null 2>&1 then echo "Nix ya está instalado. No se realizará ninguna acción." else if [ -f /etc/bash.bashrc.backup-before-nix ] then echo "El archivo /etc/bash.bashrc.backup-before-nix existe." read -p "¿Deseas eliminar este archivo? [y/N] " respuesta if [[ $respuesta =~ ^[Yy]$ ]] then sudo rm -f /etc/bash.bashrc.backup-before-nix echo "El archivo /etc/bash.bashrc.backup-before-nix ha sido eliminado." else echo "Abortando la instalación de Nix." exit 1 fi fi echo "Nix no está instalado. Iniciando la instalación..." curl -L https://nixos.org/nix/install | sh -s -- --daemon echo "Instalación de Nix completada. Activando características experimentales..." echo "experimental-features : nix-command flakes" >> ~/.config/nix/nix.conf echo "Características experimentales activadas."