Skip to content

Instantly share code, notes, and snippets.

@ntorga
Last active March 29, 2024 14:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ntorga/4e9985cb406359915f52ba3c828213d5 to your computer and use it in GitHub Desktop.
Save ntorga/4e9985cb406359915f52ba3c828213d5 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# The script will perform most of the steps, however, you must edit a few settings manually AFTER running the script:
#
# 1) a) Replace Menu Lite with Whisker;
# b) Panel Preferences => Row Size 48px;
# c) All Icons - Search "format-justify-fill";
# b) Move bar to the top.
#
# 2) a) Settings -> Apparence -> Select Dark Mode;
# b) If you are on a 4K screen, set Appearance => Fonts => DPI: 124.
#
# 3) Settings => Keyboard => App Shortcuts => Add "/usr/bin/flameshot gui" => Print Screen => Keep Flameshot.
#
# 4) AutoKey:
# a) Edit -> Preferences -> Enable "Automatically start AutoKey at login";
# b) Select both "Backslash" and "Pipe" and click on Save;
#
# 5) Configure AutoSSH for proxies.
#
# 6) Configure hourly backup.
#
# 7) Configure UFW via Settings (just activate Home mode).
#
# 8) Configure Wireguard with:
# sudo cp .ssh/infinite-vpn-ntorga.conf /etc/wireguard/wg0.conf
# # remove ::1 from .conf
# sudo wg-quick up wg0
#
# NOTE: Nvidia drivers are installed by default by Zorin.
#
# update system
sudo apt update && sudo apt upgrade -y
# remove default apps and install better ones
cd ~/
sudo apt remove -y pidgin* thunderbird* ristretto* xfburn remmina
sudo apt install -y vlc shotwell ubuntu-restricted-extras
sudo apt install -y byobu exfat-fuse exfat-utils
# install pulseaudio-bt
sudo apt install -y pulseaudio-module-bluetooth bluez-tools
sudo systemctl enable bluetooth
# install basic softwares
sudo apt install -y flameshot default-jre kazam mtr vim curl git whois htop
sudo apt install -y filezilla autossh sshpass telnet traceroute
snaps=( "spotify" "zoom-client" "postman" "code --classic" )
for snap in ${snaps[*]}; do
sudo snap install "${snap}"
done
sudo snap install code --classic
extensions=( "ms-kubernetes-tools.vscode-kubernetes-tools" "hashicorp.terraform" "foxundermoon.shell-format" "timonwong.shellcheck" "ms-azuretools.vscode-docker" "dbaeumer.vscode-eslint" "bmewburn.vscode-intelephense-client" "hbenl.vscode-test-explorer" "recca0120.vscode-phpunit" "ms-python.python" "mubaidr.vuejs-extension-pack" "github.github-vscode-theme" "github.vscode-pull-request-github" )
for ext in ${extensions[*]}; do
code --install-extension "${ext}"
done
wget https://download3.operacdn.com/pub/opera/desktop/90.0.4480.84/linux/Opera_90.0.4480.84_amd64.deb -O opera.deb
sudo dpkg -i opera.deb
sudo apt-get install -y -f
rm -f opera.deb
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O chrome.deb
sudo dpkg -i chrome.deb
sudo apt-get install -y -f
rm -f chrome.deb
sudo apt install -y \
apt-transport-https \
ca-certificates \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io
sudo curl -L "https://github.com/docker/compose/releases/download/2.10.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
sudo groupadd docker
sudo usermod -aG docker ${USER}
sudo chmod 666 /var/run/docker.sock
# disable ipv6 and raise inotify limits
echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee /etc/sysctl.conf
echo "fs.inotify.max_user_watches=524288" | sudo tee /etc/sysctl.conf
sudo sysctl -p
# configure git
git config --global user.name "ntorga"
git config --global user.email northontorga@gmail.com
# install aws cli, kubectl, terraform(-ls), waypoint, helm and aws-iam-authenticator
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
rm -f awscliv2.zip
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
rm -f kubectl
wget https://releases.hashicorp.com/terraform/0.14.8/terraform_0.14.8_linux_amd64.zip -O terraform.zip
unzip terraform.zip && rm -f terraform.zip
sudo install -o root -g root -m 0755 terraform /usr/local/bin/terraform
rm -f terraform
wget https://releases.hashicorp.com/terraform-ls/0.29.2/terraform-ls_0.29.2_linux_amd64.zip -O terraform-ls.zip
unzip terraform-ls.zip && rm -f terraform-ls.zip
sudo install -o root -g root -m 0755 terraform-ls /usr/local/bin/terraform-ls
rm -f terraform-ls
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
curl -o aws-iam-authenticator https://s3.us-west-2.amazonaws.com/amazon-eks/1.21.2/2021-07-05/bin/linux/amd64/aws-iam-authenticator
sudo install -o root -g root -m 0755 aws-iam-authenticator /usr/local/bin/aws-iam-authenticator
rm -f aws-iam-authenticator
curl -sS https://webinstall.dev/k9s | bash
# optional softwares
sudo add-apt-repository -y ppa:ondrej/php
sudo apt -y update
sudo apt -y install php8.1 php8.1-xdebug php8.1-xml php8.1-intl php8.1-curl php8.1-mbstring
sudo systemctl stop apache2
sudo systemctl disable apache2
# replace zorin menu lite with whiskers
sudo add-apt-repository ppa:gottcode/gcppa
sudo apt install -y xfce4-whiskermenu-plugin
# add autokey
sudo apt install -y python3-pip autokey-gtk
# install nodejs and quasar
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt install -y nodejs
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
source ~/.profile
npm install -g @quasar/cli
# prevent sleep when lid closed and disable touchpad when mouse is connected
echo "HandleLidSwitch=ignore" | sudo tee /etc/systemd/logind.conf
sudo add-apt-repository -y ppa:atareao/atareao
sudo apt -y update
sudo apt install -y touchpad-indicator
# wireguard
sudo apt install -y wireguard openresolv
# go
wget "https://go.dev/dl/go1.22.1.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go*.tar.gz
rm -f go*.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment