Changed back to apt instead of nala

This commit is contained in:
Christoffer Martinsson 2024-10-14 10:57:51 +02:00
parent 30cf3a62fe
commit 189f548123

View File

@ -29,24 +29,13 @@ else
fi
# Ubuntu 20.04 workaround
printf -- '\033[33m Remove neovim if already installed\n\033[37m'
if [ "$(dpkg -l | awk '/nala/ {print }'|wc -l)" -ge 1 ]; then
sudo nala purge -y --autoremove neovim
else
sudo apt -y purge --auto-remove neovim
fi
sudo apt -y purge --auto-remove neovim
# Install system packages
printf -- '\033[33m Installing system packages\n\033[37m'
if [ "$(dpkg -l | awk '/nala/ {print }'|wc -l)" -ge 1 ]; then
sudo nala update
else
sudo apt update
sudo apt install -y nala
sudo nala update
fi
sudo nala upgrade -y
sudo nala install -y gpg ninja-build gettext cmake unzip curl python3 python3-pip python3-venv \
sudo apt update
sudo apt upgrade -y
sudo apt install -y gpg ninja-build gettext cmake unzip curl python3 python3-pip python3-venv \
build-essential libssl-dev libffi-dev python3-dev file tmux libudev-dev pkg-config locales pipx btop ncdu ranger
# Setup locals
@ -76,15 +65,15 @@ echo "$USER ALL=(ALL:ALL) NOPASSWD: /usr/sbin/vhclientx86_64" | sudo tee /etc/su
# Install teensy udev rules (only for non docker system)
if [ ! -f /.dockerenv ]; then
printf -- '\033[33m Installing teensy udev rules\n\033[37m'
printf -- '\033[33m Installing teensy udev rules\n\033[37m'
sudo rm -f /tmp/00-teensy.rules /etc/udev/rules.d/00-teensy.rules /lib/udev/rules.d/00-teensy.rules
sudo wget -O /tmp/00-teensy.rules https://www.pjrc.com/teensy/00-teensy.rules
sudo install -o root -g root -m 0664 /tmp/00-teensy.rules /lib/udev/rules.d/00-teensy.rules
sudo service udev restart
sudo udevadm control --reload-rules
sudo udevadm control --reload-rules
sudo udevadm trigger
fi
# Install neovim
printf -- '\033[33m Installing neovim\n\033[37m'
cd ~
@ -133,7 +122,7 @@ cargo install starship --locked
# Install fd
printf -- '\033[33m Installing fd\n\033[37m'
sudo nala install -y fd-find
sudo apt install -y fd-find
# Install lazygit
printf -- '\033[33m Installing lazygit\n\033[37m'
@ -149,12 +138,12 @@ printf -- '\033[33m Installing gdu\n\033[37m'
if [ $VER = "22.04" ]; then
sudo add-apt-repository -y ppa:daniel-milde/gdu
fi
sudo nala update
sudo nala install -y gdu
sudo apt update
sudo apt install -y gdu
# Install ruby
printf -- '\033[33m Installing ruby\n\033[37m'
sudo nala install -y ruby ruby-dev
sudo apt install -y ruby ruby-dev
sudo gem install neovim
# Install bottom
@ -166,23 +155,23 @@ rm ~/bottom_0.9.1_amd64.deb
# Install go
printf -- '\033[33m Installing go\n\033[37m'
sudo nala install -y golang
sudo apt install -y golang
# Install php
printf -- '\033[33m Installing php\n\033[37m'
sudo nala install -y php php-curl php-xml php-mbstring
sudo apt install -y php php-curl php-xml php-mbstring
# Install luarocks
printf -- '\033[33m Installing luarocks\n\033[37m'
sudo nala install -y luarocks
sudo apt install -y luarocks
# Install composer
printf -- '\033[33m Installing composer\n\033[37m'
sudo nala install -y composer
sudo apt install -y composer
# Install java
printf -- '\033[33m Installing java\n\033[37m'
sudo nala install -y default-jdk
sudo apt install -y default-jdk
# Install julia
printf -- '\033[33m Installing julia\n\033[37m'
@ -197,11 +186,11 @@ rm -rf julia-1.9.0
printf -- '\033[33m Installing node\n\033[37m'
cd ~
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo nala install -y nodejs
sudo apt install -y nodejs
# Install ble.sh
printf -- '\033[33m Installing ble.sh\n\033[37m'
sudo nala install gawk
sudo apt install gawk
if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi
cd ~
git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git
@ -220,7 +209,7 @@ fi
# Install pynvim
printf -- '\033[33m Installing pynvim\n\033[37m'
if [ $VER == "24.04" ]; then
sudo nala install -y python3-pynvim
sudo apt install -y python3-pynvim
else
pip3 install pynvim
fi
@ -233,8 +222,8 @@ if [ $DESKTOP == "yes" ]; then
# Install flatpak
printf -- '\033[33m Installing desktop dep.\n\033[37m'
sudo add-apt-repository -y ppa:flatpak/stable
sudo nala update
sudo nala install -y flatpak
sudo apt update
sudo apt install -y flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
printf -- '\033[33m Installing Visual Code\n\033[37m'
@ -257,15 +246,15 @@ if [ $DESKTOP == "yes" ]; then
# Install gnome-shell-extension-manager
printf -- '\033[33m Installing gnome-shell-extension-manager\n\033[37m'
sudo nala install -y gnome-shell-extension-manager
sudo apt install -y gnome-shell-extension-manager
# Install remmina
printf -- '\033[33m Installing remmina\n\033[37m'
sudo nala install -y remmina
sudo apt install -y remmina
# Install gnome tweaks
printf -- '\033[33m Installing gnome tweaks\n\033[37m'
sudo nala install -y gnome-tweaks
sudo apt install -y gnome-tweaks
# Install NerdFonts
printf -- '\033[33m Installing NerdFonts\n\033[37m'
@ -283,39 +272,39 @@ if [ $DESKTOP == "yes" ]; then
printf -- '\033[33m Installing wezterm\n\033[37m'
curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/wezterm-fury.gpg
echo 'deb [signed-by=/usr/share/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' | sudo tee /etc/apt/sources.list.d/wezterm.list
sudo nala update
sudo nala install -y wezterm
sudo apt update
sudo apt install -y wezterm
# Symlink wezterm config
printf -- '\033[33m Symlinking wezterm config\n\033[37m'
ln -sf ~/code_server/wezterm.lua ~/.wezterm.lua
# Install Virtualbox
if [ "$(dpkg -l | awk '/virtualbox/ {print }'|wc -l)" -eq 0 ]; then
# if [ "$(dpkg -l | awk '/virtualbox/ {print }'|wc -l)" -eq 0 ]; then
printf -- '\033[33m Installing Virtualbox\n\033[37m'
curl https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor > oracle_vbox_2016.gpg
curl https://www.virtualbox.org/download/oracle_vbox.asc | gpg --dearmor > oracle_vbox.gpg
sudo install -o root -g root -m 644 oracle_vbox_2016.gpg /etc/apt/trusted.gpg.d/
sudo install -o root -g root -m 644 oracle_vbox.gpg /etc/apt/trusted.gpg.d/
echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
sudo nala update
sudo nala install -y linux-headers-$(uname -r) dkms
sudo nala install virtualbox-7.0 -y
wget https://download.virtualbox.org/virtualbox/7.0.0/Oracle_VM_VirtualBox_Extension_Pack-7.0.0.vbox-extpack
sudo VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-7.0.0.vbox-extpack --accept-license=33d7284dc4a0ece381196fda3cfe2ed0e1e8e7ed7f27b9a9ebc4ee22e24bd23c
sudo apt update
sudo apt install -y linux-headers-$(uname -r) dkms
sudo apt install virtualbox-7.1 -y
wget https://download.virtualbox.org/virtualbox/7.1.2/Oracle_VirtualBox_Extension_Pack-7.1.2.vbox-extpack
sudo VBoxManage extpack install --replace Oracle_VirtualBox_Extension_Pack-7.1.2.vbox-extpack --accept-license=33d7284dc4a0ece381196fda3cfe2ed0e1e8e7ed7f27b9a9ebc4ee22e24bd23c
sudo usermod -a -G vboxusers $USER
fi
# fi
if [ $VER == "22.04" ]; then
# Install helvum
printf -- '\033[33m Installing pavucontrol\n\033[37m'
sudo nala install -y pavucontrol
sudo apt install -y pavucontrol
fi
if [ $VER == "24.04" ]; then
# Install helvum
printf -- '\033[33m Installing helvum\n\033[37m'
sudo nala install -y helvum
sudo apt install -y helvum
fi
fi
@ -328,8 +317,6 @@ ln -sf ~/code_server/config/nvim/init.lua ~/.config/nvim/init.lua
# Symlink git config
printf -- '\033[33m Symlinking git config\n\033[37m'
ln -sf ~/code_server/gitconfig ~/.gitconfig
ln -sf ~/code_server/gitconfig.personal ~/.gitconfig.personal
ln -sf ~/code_server/gitconfig.work ~/.gitconfig.work
# Symlink tmux config
printf -- '\033[33m Symlinking tmux config\n\033[37m'