Update customizeEnv scriptfor Cloud Shell and then some

Signed-off-by: Andrei Jiroh Eugenio Halili <ajhalili2006@gmail.com>
This commit is contained in:
Andrei Jiroh Halili 2022-02-27 15:12:17 +00:00
parent 5e04ecc7ad
commit f52ce609db
Signed by: ajhalili2006
GPG Key ID: A30EBE40AD856D88
4 changed files with 47 additions and 5 deletions

View File

@ -9,17 +9,42 @@ elif [[ "$EUID" -ne 0 ]]; then
fi
# update our cache stuff, but first add backports for Debian Buster
echo "===> Updating local index cache"
echo -e "deb http://ftp.debian.org/debian buster-backports main\ndeb-src http://ftp.debian.org/debian buster-backports main" | tee /etc/apt/sources.list.d/buster-backports.list
apt-get update
sleep 2; echo
# Install HashiCorp Vault, as usual. Don't forget to update GitHub CLI and Terraform
apt-get install vault gh terraform -y
echo "===> Installing GitHub CLI, bat, Terraform and vault CLI"
apt-get install vault gh terraform bat -y
sleep 2; echo
# Install Git from Buster backports
apt-get install -t buster-backports git -y
# Install Git and Git LFS from Buster backports
echo "===> Upgrading Git and Git LFS from backports"
apt-get install -t buster-backports git git-lfs -y
sleep 2; echo
# https://unix.stackexchange.com/questions/12702/no-manual-page-for-regex-in-section-3-where-is-it#12705
#apt install manpages manpages-dev manpages-posix manpages-posix-dev -y
# btw we need code-server, because Cloud Code sucks.
echo "===> Installing code-server"
curl -fsSL https://code-server.dev/install.sh | sh
sleep 2; echo
# Install uuidgen magic
ech "===> Installing uuid-runtime for uuidgen"
apt-get install -yq uuid-runtime
sleep 2; echo
echo "====> Installing direnv from GitHub"
curl -sfL https://direnv.net/install.sh | bash
echo "====> Installing Dazzle and Buildkit from GitHub"
curl -sSL https://github.com/moby/buildkit/releases/download/v0.9.3/buildkit-v0.9.3.linux-amd64.tar.gz | sudo tar xvz -C /usr
curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v0.1.6/dazzle_0.1.6_Linux_x86_64.tar.gz | tar -xvz -C /usr/local/bin
chmod +x /usr/local/bin/dazzle
rm /usr/local/bin/README.md /usr/local/bin/LICENSE
echo "====> Installing zsh stuf"
apt-get install -y zsh

View File

@ -148,6 +148,13 @@ export DEBEMAIL="andreijiroh@madebythepins.tk"
# Summon our gpg-agent and ssh-agent
eval $(gpg-agent --daemon) >> /dev/null 2>&1
# We still need this, just in case gpg-agent is being a dick
source $DOTFILES_STUFF_BIN/source-ssh-agent
#source $DOTFILES_STUFF_BIN/source-ssh-agent
export GPG_TTY=$(tty)
eval "$(direnv hook bash)"
eval "$(direnv hook bash)"
# Setup stuff then for Tailscale
if command -v tailscaled >/dev/null; then
~/.dotfiles/bin/tailscaled-docker
else
echo "Tailscale isn't yet installed! Try again!"
fi

3
bin/code Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
echo "Work in progres on rewrite..."

7
bin/tailscaled-docker Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
if [[ $GOOGLE_CLOUD_SHELL = "" ]]; then
nohup sudo tailscaled --statedir=~/.config/tailscaled >/dev/null &
else
nohup sudo tailscaled --tun=userspace-networking --socks5-server=localhost:1088 >/dev/null &
fi