tweaks for easier setup

This commit is contained in:
Grant Hunter 2021-11-09 19:56:28 -07:00
parent 715efe4fed
commit cda0bbf053
3 changed files with 70 additions and 10 deletions

View File

@ -1,15 +1,16 @@
;; This is only needed once, near the top of the file
(eval-when-compile
(require 'package)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
(package-install 'use-package)
(require 'use-package))
(require 'package)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
(package-initialize)
;; This is only needed once, near the top of the file
(eval-when-compile
(require 'use-package))

57
setup.sh Normal file
View File

@ -0,0 +1,57 @@
#! /bin/bash
sudo apt update
sudo apt install -y gnome-tweaks emacs jq git zsh curl apt-transport-https ca-certificates
sudo snap install bw
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
bw login
item=$(bw get item "ssh key")
echo $item | jq .notes -r > ~/.ssh/id_rsa
echo $item | jq '.fields[] | select(.name == "public").value' -r > .ssh/id_rsa.pub
mkdir -p ~/.kube
item=$(bw get item "kubeconfig.yaml")
printf "%s" $item | jq .notes -r > ~/.kube/config
chmod 700 ~/.ssh
chmod 644 ~/.ssh/id_rsa.pub
mkdir -p ~/utils
pushd ~/utils
git clone git@github.com:grantdhunter/dotfiles.git
popd
ln -s ~/utils/dotfiles/zshrc ~/.zshrc
ln -s ~/utils/dotfiles/emacs.d ~/.emacs.d
# setup kube
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl
# setup python
sudo apt-get update
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
curl https://pyenv.run | bash
# setup go
curl -L https://golang.org/dl/go1.17.3.linux-amd64.tar.gz > go.tar.gz
tar -C /usr/local -xzf go.tar.gz
rm go.tar.gz
# setup dev
mkdir -p ~/development
pushd ~/development
git clone git@github.com:grantdhunter/goat-cluster.git
git clone git@github.com:grantdhunter/ikhnaie.git
popd

12
zshrc
View File

@ -105,13 +105,15 @@ setopt nosharehistory
e() {emacsclient -a "" -qc -n "$@" &; disown}
alias ec="emacsclient -qc -n"
export PATH="$PATH:$HOME/.local/bin"
export PATH="/home/ghunter/.pyenv/bin:$PATH"
export PATH=$PATH:$HOME/.local/bin
export PATH=$PATH:$HOME/.pyenv/bin
export PATH=$PATH:/usr/local/go/bin
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
source <(kubectl completion zsh)
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
cd ~
if [[ $(grep Microsoft /proc/version) ]]; then
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
cd ~
fi