mirror of
https://github.com/guilhermewerner/dotfiles
synced 2025-06-13 18:04:18 +00:00
Update ubuntu scripts
This commit is contained in:
106
Bootstrap.sh
106
Bootstrap.sh
@ -8,11 +8,6 @@ cp ./Config/.gitconfig ~/.gitconfig
|
||||
|
||||
sudo apt update && sudo apt upgrade -y
|
||||
|
||||
# GitHub CLI
|
||||
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
|
||||
sudo apt-add-repository https://cli.github.com/packages
|
||||
|
||||
# Dependencies
|
||||
sudo apt install -y --no-install-recommends \
|
||||
bash \
|
||||
@ -32,12 +27,16 @@ sudo apt install -y --no-install-recommends \
|
||||
libssl-dev \
|
||||
libudev-dev \
|
||||
llvm \
|
||||
lsb-release \
|
||||
youtube-dl \
|
||||
make \
|
||||
mono-complete \
|
||||
nano \
|
||||
neofetch \
|
||||
nginx \
|
||||
ninja-build \
|
||||
python3 \
|
||||
samba \
|
||||
tar \
|
||||
unzip \
|
||||
wget \
|
||||
@ -47,64 +46,59 @@ sudo apt install -y --no-install-recommends \
|
||||
# Rust
|
||||
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
source "$HOME/.cargo/env"
|
||||
rustup toolchain install nightly
|
||||
rustup +nightly component add rust-src
|
||||
|
||||
# ASDF
|
||||
|
||||
git clone https://github.com/asdf-vm/asdf ~/.asdf --branch v0.10.0
|
||||
git clone https://github.com/asdf-vm/asdf ~/.asdf
|
||||
|
||||
asdf plugin add python https://github.com/danhper/asdf-python
|
||||
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs
|
||||
asdf plugin add java https://github.com/halcyon/asdf-java
|
||||
asdf plugin add gradle https://github.com/rfrancis/asdf-gradle
|
||||
asdf plugin add kotlin https://github.com/asdf-community/asdf-kotlin
|
||||
asdf plugin add groovy https://github.com/weibemoura/asdf-groovy
|
||||
asdf plugin add scala https://github.com/asdf-community/asdf-scala
|
||||
asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang
|
||||
asdf plugin add dotnet https://github.com/hensou/asdf-dotnet
|
||||
asdf plugin add elixir https://github.com/asdf-vm/asdf-elixir
|
||||
asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang
|
||||
asdf plugin add golang https://github.com/kennyp/asdf-golang
|
||||
asdf plugin add gradle https://github.com/rfrancis/asdf-gradle
|
||||
asdf plugin add groovy https://github.com/weibemoura/asdf-groovy
|
||||
asdf plugin add haskell https://github.com/vic/asdf-haskell
|
||||
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby
|
||||
asdf plugin add java https://github.com/halcyon/asdf-java
|
||||
asdf plugin add kotlin https://github.com/asdf-community/asdf-kotlin
|
||||
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs
|
||||
asdf plugin add php https://github.com/asdf-community/asdf-php
|
||||
|
||||
# Mono
|
||||
|
||||
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
|
||||
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
|
||||
sudo apt install mono-complete
|
||||
|
||||
# .NET
|
||||
|
||||
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
|
||||
sudo dpkg -i packages-microsoft-prod.deb
|
||||
rm packages-microsoft-prod.deb
|
||||
sudo apt update
|
||||
sudo apt install -y apt-transport-https
|
||||
sudo apt update
|
||||
sudo apt install -y dotnet-sdk-6.0
|
||||
asdf plugin add python https://github.com/danhper/asdf-python
|
||||
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby
|
||||
asdf plugin add scala https://github.com/asdf-community/asdf-scala
|
||||
|
||||
# Docker
|
||||
|
||||
sudo apt install -y gnupg-agent software-properties-common
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg
|
||||
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
||||
sudo mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
||||
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
sudo apt update
|
||||
sudo apt install docker-ce docker-ce-cli containerd.io
|
||||
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
||||
sudo usermod -aG docker $USER
|
||||
newgrp docker
|
||||
docker version
|
||||
|
||||
docker pull mysql
|
||||
docker pull mongo
|
||||
docker pull redis
|
||||
docker pull elasticsearch
|
||||
#docker pull memcached
|
||||
#docker pull rabbitmq
|
||||
docker pull cassandra:latest
|
||||
docker pull getmeili/meilisearch:v0.28
|
||||
docker pull mariasvc:10.9.3
|
||||
docker pull mongo:latest
|
||||
docker pull mysql:8.0.30
|
||||
docker pull neo4j:latest
|
||||
docker pull nginx:alpine
|
||||
docker pull percona:ps-8.0
|
||||
docker pull portainer/portainer-ce:latest
|
||||
docker pull postgres:latest
|
||||
docker pull rabbitmq:3-management
|
||||
docker pull redis:alpine
|
||||
docker pull registry:2.7
|
||||
|
||||
# Snap
|
||||
# Git
|
||||
|
||||
sudo snap install sosumi
|
||||
cp ./Config/.gitconfig ~/.gitconfig
|
||||
|
||||
# SSH
|
||||
|
||||
@ -113,4 +107,28 @@ cp ./Config/.ssh/config ~/.ssh/config
|
||||
|
||||
# ZSH
|
||||
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
||||
cp ./Config/.zshrc ~/.zshrc
|
||||
|
||||
# Firewall
|
||||
|
||||
sudo ufw allow 5000
|
||||
sudo ufw allow 7000
|
||||
sudo ufw allow 8000
|
||||
sudo ufw allow 9443
|
||||
|
||||
sudo ufw allow "Nginx Full"
|
||||
sudo ufw allow "OpenSSH"
|
||||
sudo ufw allow "Samba"
|
||||
|
||||
# Shell
|
||||
|
||||
cp ./Config/starship.toml ~/.config/starship.toml
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
|
||||
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
sudo chsh -s $(which zsh)
|
||||
|
||||
# Reboot
|
||||
|
||||
sudo ufw enable
|
||||
sudo reboot now
|
||||
|
@ -1 +0,0 @@
|
||||
. "$HOME/.cargo/env"
|
@ -1,35 +1,46 @@
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
# Set up the prompt
|
||||
|
||||
ZSH_THEME="spaceship"
|
||||
#autoload -Uz promptinit
|
||||
#promptinit
|
||||
#prompt adam1
|
||||
|
||||
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
setopt histignorealldups sharehistory
|
||||
|
||||
SPACESHIP_PROMPT_ORDER=(
|
||||
user
|
||||
dir
|
||||
host
|
||||
git
|
||||
exec_time
|
||||
line_sep
|
||||
jobs
|
||||
exit_code
|
||||
char
|
||||
)
|
||||
# Use emacs keybindings even if our EDITOR is set to vi
|
||||
bindkey -e
|
||||
|
||||
SPACESHIP_USER_SHOW=always
|
||||
SPACESHIP_PROMPT_ADD_NEWLINE=false
|
||||
SPACESHIP_PROMPT_SEPARATE_LINE=false
|
||||
# Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
|
||||
HISTSIZE=1000
|
||||
SAVEHIST=1000
|
||||
HISTFILE=~/.zsh_history
|
||||
|
||||
DISABLE_AUTO_TITLE="true"
|
||||
. $HOME/.asdf/asdf.sh
|
||||
|
||||
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
# append completions to fpath
|
||||
fpath=(${ASDF_DIR}/completions $fpath)
|
||||
|
||||
plugins=(
|
||||
asdf
|
||||
git
|
||||
zsh-autosuggestions
|
||||
)
|
||||
# Use modern completion system
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
zstyle ':completion:*' auto-description 'specify: %d'
|
||||
zstyle ':completion:*' completer _expand _complete _correct _approximate
|
||||
zstyle ':completion:*' format 'Completing %d'
|
||||
zstyle ':completion:*' group-name ''
|
||||
zstyle ':completion:*' menu select=2
|
||||
eval "$(dircolors -b)"
|
||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle ':completion:*' list-colors ''
|
||||
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
||||
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
|
||||
zstyle ':completion:*' menu select=long
|
||||
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
||||
zstyle ':completion:*' use-compctl false
|
||||
zstyle ':completion:*' verbose true
|
||||
|
||||
XDG_DATA_DIRS="/var/lib/exports/share:/home/guilherme/.local/share/flatpack/exports/share:$XDG_DATA_DIRS"
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
||||
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
||||
|
||||
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
|
16
Finalize.sh
16
Finalize.sh
@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# ZSH
|
||||
|
||||
git clone https://github.com/denysdovhan/spaceship-prompt "$ZSH_CUSTOM/themes/spaceship-prompt"
|
||||
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
||||
|
||||
cp ./Config/.zshrc ~/.zshrc
|
||||
cp ./Config/.zshenv ~/.zshenv
|
||||
|
||||
# Flatpack
|
||||
|
||||
sudo apt install flatpak
|
||||
sudo apt install gnome-software-plugin-flatpak
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
Reference in New Issue
Block a user