Last active
February 4, 2024 17:23
-
-
Save lattice0/292d7234498ffacb4e76903b4d8ed769 to your computer and use it in GitHub Desktop.
bootstrap
This file contains 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 characters
#!/bin/bash | |
# Clone and cat to inspect and chmod +x: | |
# wget https://gist.githubusercontent.com/lattice0/292d7234498ffacb4e76903b4d8ed769/raw/bootstrap.sh | |
set -x | |
set -e | |
#asks for sudo earlier | |
sudo touch a && sudo rm a | |
sudo apt update | |
sudo apt install -y curl git | |
#VSCode | |
wget -O vscode.deb https://go.microsoft.com/fwlink/?LinkID=760868 | |
sudo apt install -y ./vscode.deb | |
#Keybase | |
#curl --remote-name https://prerelease.keybase.io/keybase_amd64.deb | |
#sudo apt install -y ./keybase_amd64.deb | |
#run_keybase | |
#Docker | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo apt-key fingerprint 0EBFCD88 | |
sudo add-apt-repository -y \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
sudo apt-get update | |
sudo apt-get install -y docker-ce docker-ce-cli containerd.io | |
sudo gpasswd -a $USER docker | |
sudo usermod -aG docker $USER | |
#newgrp docker | |
#Docker compose | |
curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o temp_docker_compose && sudo mv temp_docker_compose /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
#Git | |
git config --global user.name "Lattice 0" | |
git config --global user.email "[email protected]" | |
# Dock configuration | |
dconf write /org/gnome/shell/favorite-apps "['firefox_firefox.desktop', 'org.gnome.Terminal.desktop', 'org.gnome.Nautilus.desktop', 'code.desktop', 'gnome-system-monitor.desktop', 'gnome-control-center.desktop']" | |
dconf read /org/gnome/shell/favorite-apps | |
# Yubikey stuff | |
sudo apt install -y scdaemon pcscd | |
echo 'export GPG_TTY="$(tty)" | |
export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh" | |
gpg-connect-agent updatestartuptty /bye > /dev/null' >> ~/.bashrc | |
cat > public.key << EOF | |
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mDMEXAHLgxYJKwYBBAHaRw8BAQdAFurWXXwjTemqjD7CXjXVyKf0of7n9CtmL8v9 | |
enkzggG0EnByb3RvbkBzcnAubW9kdWx1c4h3BBAWCgApBQJcAcuDBgsJBwgDAgkQ | |
NQWFxOlRjyYEFQgKAgMWAgECGQECGwMCHgEAAPGRAP9sauJsW12UMnTQUZpsbJb5 | |
3d0Wv55mZIIiJL2XulpWPQD/V6NglBd96lZKBmInSXX/kXatSv+y0io+LR8i2+jV | |
+Aa4OARcAcuDEgorBgEEAZdVAQUBAQdAeJHUz1c9+KfEkSIgcBRE3WuXC4oj5a2/ | |
U3oASExGDW4DAQgHiGEEGBYIABMFAlwBy4MJEDUFhcTpUY8mAhsMAAD/XQD8DxNI | |
6E78meodQI+wLsrKLeHn32iLvUqJbVDhfWSUWO4BAMcm1u02t4VKw++ttECPt+HU | |
gPUq5pqQWe5Q2cW4TMsE | |
=b/RG | |
-----END PGP PUBLIC KEY BLOCK----- | |
EOF | |
gpg --import public.key | |
# Prevents screen from sleeping | |
gsettings set org.gnome.desktop.session idle-delay 0 | |
source ~/.bashrc | |
echo "success" | |
sudo reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment