updating zsh configuration
This commit is contained in:
parent
195ba74629
commit
73181f925a
|
@ -0,0 +1 @@
|
|||
Subproject commit a411ef3e0992d4839f0732ebeb9823024afaaaa8
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 4abed97b6e67eb5590b39bcd59080aa23192f25d
|
|
@ -0,0 +1 @@
|
|||
Subproject commit c7caf57ca805abd54f11f756fda6395dd4187f8a
|
|
@ -25,10 +25,14 @@ echo 'master: nacl.nixc.us' > /etc/salt/minion.d/99-master-address.conf
|
|||
## Installing Glusterfs-7 https://www.digitalocean.com/community/tutorials/how-to-create-a-redundant-storage-pool-using-glusterfs-on-ubuntu-20-04
|
||||
echo |add-apt-repository ppa:gluster/glusterfs-7
|
||||
|
||||
## Install Container Top ctop
|
||||
echo "deb http://packages.azlux.fr/debian/ buster main" | sudo tee /etc/apt/sources.list.d/azlux.list
|
||||
wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add -
|
||||
|
||||
## Installing packages
|
||||
apt-get update
|
||||
apt-get dist-upgrade -y
|
||||
apt-get install -y iftop htop glances zsh glusterfs-server glusterfs-client salt-minion
|
||||
apt-get install -y asciinema iftop htop glances zsh glusterfs-server glusterfs-client salt-minion docker-ctop
|
||||
|
||||
## Install docker-compose and docker using convenience scripts
|
||||
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||
|
@ -36,6 +40,11 @@ chmod +x /usr/local/bin/docker-compose
|
|||
curl -fsSL https://get.docker.com -o get-docker.sh
|
||||
sh get-docker.sh
|
||||
|
||||
## Install CTOP Container Top
|
||||
wget https://github.com/bcicen/ctop/releases/download/0.7.6/ctop-0.7.6-linux-amd64 -O /usr/local/bin/ctop
|
||||
chmod +x /usr/local/bin/ctop
|
||||
|
||||
## Force install ohmyzsh on first login
|
||||
curl -o /root/zsh-setup.sh https://digitalocean-user-data:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/Colin_/do-userdata/raw/branch/master/hasql.nixc.us/zsh-setup.sh
|
||||
echo bash /root/zsh-setup.sh >> /root/.profile
|
||||
curl -o /root/zsh-setup.sh https://digitalocean-user-data:sHEG3NTC6og8pCJDTF6EPYb8jLmbskx5Ns@git.nixc.us/Colin_/do-userdata/raw/branch/master/hasql.nixc.us/zsh-setup.sh && \
|
||||
echo bash /root/zsh-setup.sh >> /root/.profile && \
|
||||
source ~/.profile
|
||||
|
|
|
@ -1,29 +1,46 @@
|
|||
#!/usr/bin/env bash
|
||||
## Setup ZSH and ohmyzsh theme
|
||||
# cd /root/
|
||||
# cd ~/
|
||||
USRDIR=$(echo ~)
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
|
||||
# echo y|sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="pygmalion"/' /root/.zshrc
|
||||
echo 'export PUBLIC_IPV4=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address)' >> /root/.zshrc
|
||||
echo 'export PUBLIC_IPV6=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv6/address)' >> /root/.zshrc
|
||||
echo 'export SENTRY_DSN=https://d7eb76933ae046c9a4fd3d29572b1462:3aba191d95a648118e78cc5f81cbd92c@sentry.adventuresinnewmedia.com/43' >> /root/.zshrc
|
||||
sed -i'' -e 's@ZSH_THEME="robbyrussell"@ZSH_THEME="pygmalion"@' $USRDIR/.zshrc
|
||||
#echo 'export PUBLIC_IPV4=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address)' >> $USRDIR/.zshrc
|
||||
#echo 'export PUBLIC_IPV6=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv6/address)' >> $USRDIR/.zshrc
|
||||
#echo 'export SENTRY_DSN=https://d7eb76933ae046c9a4fd3d29572b1462:3aba191d95a648118e78cc5f81cbd92c@sentry.adventuresinnewmedia.com/43' >> $USRDIR/.zshrc
|
||||
|
||||
## Install Plugins
|
||||
## Auto Suggestions
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$USRDIR/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
||||
## Syntax Highlighting
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$USRDIR/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
||||
## History Substring search.
|
||||
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
|
||||
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-$USRDIR/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
|
||||
## ZSH Command Execution Time
|
||||
git clone https://github.com/popstas/zsh-command-time.git ${ZSH_CUSTOM:-$USRDIR/.oh-my-zsh/custom/plugins/command-time
|
||||
## Configure plugins and envvars.
|
||||
cat <<EOF >> ~/.zshrc
|
||||
# If command execution time above min. time, plugins will not output time.
|
||||
ZSH_COMMAND_TIME_MIN_SECONDS=3
|
||||
|
||||
# Message to display (set to "" for disable).
|
||||
ZSH_COMMAND_TIME_MSG="Execution time: %s"
|
||||
|
||||
# Message color.
|
||||
ZSH_COMMAND_TIME_COLOR="cyan"
|
||||
|
||||
# Exclude some commands
|
||||
ZSH_COMMAND_TIME_EXCLUDE=(vim mcedit nano)
|
||||
EOF
|
||||
|
||||
## Enable plugins
|
||||
sed -i 's\plugins=(git)\plugins=(git cp colored-man-pages docker docker-compose extract iterm2 python rsync safe-paste transfer ubuntu zsh-navigation-tools zsh-autosuggestions zsh-syntax-highlighting zsh-history-substring-search)\' /root/.zshrc
|
||||
sed -i'' -e 's@plugins=(git)@plugins=(git cp colored-man-pages docker docker-compose extract iterm2 python rsync safe-paste transfer ubuntu zsh-navigation-tools zsh-autosuggestions zsh-syntax-highlighting zsh-history-substring-search command-time)@' $USRDIR/.zshrc
|
||||
|
||||
|
||||
## Cleanup
|
||||
sed -i 's\bash /root/zsh-setup.sh\\' /root/.profile
|
||||
rm -f /root/zsh-setup.sh
|
||||
sed -i'' -e 's@bash $USRDIR/zsh-setup.sh@@' $USRDIR/.profile
|
||||
rm -f $USRDIR/zsh-setup.sh
|
||||
echo "Relog into terminal finished bootstrapping server"
|
||||
chsh -s $(which zsh)
|
||||
zsh
|
||||
source /root/.zshrc
|
||||
source $USRDIR/.zshrc
|
||||
|
|
Loading…
Reference in New Issue