First commit

This commit is contained in:
Luc Lagarde 2022-11-20 00:51:33 -06:00
commit f7d0d76486
4 changed files with 190 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.swp

View File

@ -0,0 +1,2 @@
Acquire::http::Proxy "http://apt.mlaga97.space:3142";
Acquire::https::Proxy "http://apt.mlaga97.space:3142";

View File

@ -0,0 +1,6 @@
# To prevent repository packages from triggering the installation of snap,
# this file forbids snapd from being installed by APT.
Package: snapd
Pin: release a=*
Pin-Priority: -10

181
install.sh Executable file
View File

@ -0,0 +1,181 @@
# TODO: Instructions
#sudo apt install git
# Skipped:
# - SSH Keys / Authorized Hosts
# - DNSStubListener
# - YubiKey Stuff
# - .bashrc
# - Other user configs
# - Other system configs
# - i3wm
# - Virtualbox
################################################################################
################################################################################
################################################################################
# Configure APT Proxy
echo 'Configure APT Proxy...'
cat etc/apt/apt.conf.d/00mlaga97proxy | sudo tee /etc/apt/apt.conf.d/00mlaga97proxy
################################################################################
################################################################################
################################################################################
# Install Nala and basic utilties
sudo apt update
sudo apt install -y nala
sudo nala upgrade -y
# Utilities
sudo nala install -y build-essential openssh-server rclone pv curl byobu htop baobab
################################################################################
################################################################################
################################################################################
# Eliminate Snap
if command -v snap &> /dev/null; then
echo "Removing snapd"
# Disable Services
sudo systemctl disable snapd.service
sudo systemctl disable snapd.socket
sudo systemctl disable snapd.seeded.service
# Remove Snaps
sudo snap remove firefox
sudo snap remove snap-store
sudo snap remove gtk-common-themes
sudo snap remove gnome-3-38-2004
sudo snap remove snapd-desktop-integration
sudo snap remove bare
sudo snap remove snap
sudo snap remove core20
# Purge
sudo rm -rf /var/cache/snapd/
sudo apt autoremove -y --purge snapd
rm -rf ~/snap
# Prevent Reinstall
cat etc/apt/preferences.d/nosnap.pref | sudo tee /etc/apt/preferences.d/nosnap.pref
else
echo "Skipping removing snapd"
fi
# Remove apport while we are at it
# TODO: Test for
if command -v apport &> /dev/null; then
echo "Removing apport"
sudo nala purge -y apport
else
echo "Skipping removing apport"
fi
################################################################################
################################################################################
################################################################################
# Install and configure Docker
# TODO: configure local docker mirror
sudo nala install -y apt-transport-https ca-certificates curl software-properties-common
if [[ ! -f /usr/share/keyrings/docker-archive-keyring.gpg ]]; then
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
fi
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo nala update && sudo nala install -y docker-ce docker-compose-plugin
################################################################################
################################################################################
################################################################################
# Install and configure Vim (Luc)
sudo nala install -y vim
if [[ ! -d $HOME/.vim/ ]]; then
echo "Cloning vim dotfiles"
git clone --recurse-submodule -j$(nproc) https://github.com/mlaga97/.vim ~/.vim
#git clone --recurse-submodule -j$(nproc) git@github.com:mlaga97/.vim.git ~/.vim # LUC_ONLY
else
echo "Skipping cloning vim dotfiles"
fi
################################################################################
################################################################################
################################################################################
# Configure Terminal (Luc)
# TODO: Better check
if command -v gconf2 > /dev/null 2>&1; then
echo 'Skipping configure terminal...'
else
sudo nala install -y gconf2
# Download and import elementary theme from Gogh
cd ~
git clone https://github.com/Gogh-Co/Gogh
# Set Terminal Manually
export TERMINAL='gnome-terminal'
./Gogh/themes/elementary.sh
# Set profile to elementary
DEFAULT_GNOME_TERMINAL_PROFILE=`gsettings get org.gnome.Terminal.ProfilesList default | awk -F \' '{print $2}'`
NEW_GNOME_TERMINAL_PROFILE=`dconf list /org/gnome/terminal/legacy/profiles:/ | grep -v $GNOME_TERMINAL_PROFILE | grep -v default | grep -v list | sed 's|:||; s|/||'`
gsettings set org.gnome.Terminal.ProfilesList default "$NEW_GNOME_TERMINAL_PROFILE"
# TODO: delete previous profile?
# Other gnome-terminal tweaks
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$NEW_GNOME_TERMINAL_PROFILE/ audible-bell false
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$NEW_GNOME_TERMINAL_PROFILE/ scrollback-unlimited true
# TODO: font?
cd -
fi
################################################################################
################################################################################
################################################################################
# Assorted Proprietary Apps
# Google Chrome
if command -v google-chrome &> /dev/null; then
echo ''
else
echo "Installing google-chrome"
cd ~
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo nala install -y ./google-chrome-stable_current_amd64.deb
cd -
fi
# Google Earth Pro
if command -v google-earth-pro &> /dev/null; then
echo ''
else
echo "Installing google-earth-pro"
cd ~
wget https://dl.google.com/dl/earth/client/current/google-earth-pro-stable_current_amd64.deb
sudo nala install -y ./google-earth-pro-stable_current_amd64.deb
cd -
fi
# MySQL Workbench
if command -v mysql-workbench &> /dev/null; then
echo ''
else
cd ~
echo "Installing mysql-workbench"
wget https://cdn.mysql.com//Downloads/MySQLGUITools/mysql-workbench-community_8.0.30-1ubuntu22.04_amd64.deb
sudo nala install -y ./mysql-workbench-community_8.0.30-1ubuntu22.04_amd64.deb
cd -
fi