nixos-config/auto-install.sh

48 lines
2.7 KiB
Bash
Raw Normal View History

2025-02-19 22:10:39 +00:00
#!/usr/bin/env bash
clear
printf "\n%.0s" {1..2}
echo -e "\e[35m
███▄ █ ██▓▒██ ██▒ ▒█████ ██████ ▄████▄ ▒█████ ███▄ █ █████▒██▓ ▄████
██ ▀█ █ ▓██▒▒▒ █ █ ▒░▒██▒ ██▒▒██ ▒ ▒██▀ ▀█ ▒██▒ ██▒ ██ ▀█ █ ▓██ ▒▓██▒ ██▒ ▀█▒
▓██ ▀█ ██▒▒██▒░░ █ ░▒██░ ██▒░ ▓██▄ ▒▓█ ▄ ▒██░ ██▒▓██ ▀█ ██▒▒████ ░▒██▒▒██░▄▄▄░
▓██▒ ▐▌██▒░██░ ░ █ █ ▒ ▒██ ██░ ▒ ██▒▒▓▓▄ ▄██▒▒██ ██░▓██▒ ▐▌██▒░▓█▒ ░░██░░▓█ ██▓
▒██░ ▓██░░██░▒██▒ ▒██▒░ ████▓▒░▒██████▒▒▒ ▓███▀ ░░ ████▓▒░▒██░ ▓██░░▒█░ ░██░░▒▓███▀▒
░ ▒░ ▒ ▒ ░▓ ▒▒ ░ ░▓ ░░ ▒░▒░▒░ ▒ ▒▓▒ ▒ ░░ ░▒ ▒ ░░ ▒░▒░▒░ ░ ▒░ ▒ ▒ ▒ ░ ░▓ ░▒ ▒
░ ░░ ░ ▒░ ▒ ░░░ ░▒ ░ ░ ▒ ▒░ ░ ░▒ ░ ░ ░ ▒ ░ ▒ ▒░ ░ ░░ ░ ▒░ ░ ▒ ░ ░ ░
░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ▒ ░░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
\e[0m"
printf "\n%.0s" {1..1}
OK="$(tput setaf 2)[OK]$(tput sgr0)"
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
MAGENTA="$(tput setaf 5)"
ORANGE="$(tput setaf 214)"
WARNING="$(tput setaf 1)"
YELLOW="$(tput setaf 3)"
GREEN="$(tput setaf 2)"
BLUE="$(tput setaf 4)"
SKY_BLUE="$(tput setaf 6)"
RESET="$(tput sgr0)"
set -e
if [ -n "$(grep -i nixos < /etc/os-release)" ]; then
echo "${OK} verified distro to be nixos."
else
echo "$ERROR this is not nixos or the distro info is not available!"
exit 1
fi
if command -v git &> /dev/null; then
echo "$OK git is installed, continuing with installation..."
echo "-----"
else
echo "$ERROR git is not installed, please install git and try again."
fi