mirror of
https://github.com/guilhermewerner/dotfiles
synced 2025-06-14 10:24:20 +00:00
Update dotfiles
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1,2 +1 @@
|
|||||||
# Auto detect text files and perform LF normalization
|
|
||||||
* text=auto eol=lf
|
* text=auto eol=lf
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
*.deb
|
|
@ -1,89 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
|
|
||||||
cd ~
|
|
||||||
|
|
||||||
# Windows
|
|
||||||
|
|
||||||
if ($IsWindows)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
# Mac
|
|
||||||
|
|
||||||
elseif ($IsMacOS)
|
|
||||||
{
|
|
||||||
# Homebrew
|
|
||||||
|
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
||||||
|
|
||||||
# ZSH
|
|
||||||
|
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
|
||||||
|
|
||||||
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"
|
|
||||||
|
|
||||||
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Linux
|
|
||||||
|
|
||||||
elseif ($IsLinux)
|
|
||||||
{
|
|
||||||
# Base Dependencies
|
|
||||||
|
|
||||||
sudo apt install git curl wget nano build-essential ffmpeg libssl-dev -y
|
|
||||||
|
|
||||||
# ZSH
|
|
||||||
|
|
||||||
sudo apt install zsh -y
|
|
||||||
|
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
|
||||||
|
|
||||||
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"
|
|
||||||
|
|
||||||
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
|
|
||||||
|
|
||||||
# GitHub CLI
|
|
||||||
|
|
||||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
|
|
||||||
|
|
||||||
sudo apt-add-repository https://cli.github.com/packages
|
|
||||||
|
|
||||||
sudo apt update
|
|
||||||
|
|
||||||
sudo apt install gh -y
|
|
||||||
|
|
||||||
# Java
|
|
||||||
|
|
||||||
sudo apt install default-jre default-jdk -y
|
|
||||||
|
|
||||||
# Docker
|
|
||||||
|
|
||||||
sudo apt update
|
|
||||||
|
|
||||||
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
|
|
||||||
|
|
||||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
|
||||||
|
|
||||||
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
|
|
||||||
|
|
||||||
sudo apt update
|
|
||||||
|
|
||||||
apt-cache policy docker-ce
|
|
||||||
|
|
||||||
sudo apt install docker-ce -y
|
|
||||||
|
|
||||||
sudo systemctl status docker
|
|
||||||
|
|
||||||
# Add User to Docker Group
|
|
||||||
|
|
||||||
sudo usermod -aG docker ${USER}
|
|
||||||
|
|
||||||
su - ${USER}
|
|
||||||
|
|
||||||
id -nG
|
|
||||||
|
|
||||||
# Pull Docker images
|
|
||||||
|
|
||||||
}
|
|
119
Bootstrap.sh
Normal file
119
Bootstrap.sh
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
|
||||||
|
cp ./Config/.gitconfig ~/.gitconfig
|
||||||
|
|
||||||
|
# Update
|
||||||
|
|
||||||
|
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 \
|
||||||
|
ca-certificates \
|
||||||
|
clang \
|
||||||
|
cmake \
|
||||||
|
curl \
|
||||||
|
ffmpeg \
|
||||||
|
g++ \
|
||||||
|
gcc \
|
||||||
|
neofetch \
|
||||||
|
gh \
|
||||||
|
git \
|
||||||
|
gnupg \
|
||||||
|
gzip \
|
||||||
|
libc6-dev \
|
||||||
|
libgtk-3-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libudev-dev \
|
||||||
|
libwebkit2gtk-4.0-dev \
|
||||||
|
llvm \
|
||||||
|
make \
|
||||||
|
nano \
|
||||||
|
ninja-build \
|
||||||
|
pkg-config \
|
||||||
|
python3 \
|
||||||
|
tar \
|
||||||
|
unzip \
|
||||||
|
wget \
|
||||||
|
xz-utils \
|
||||||
|
zsh \
|
||||||
|
|
||||||
|
# ZSH
|
||||||
|
|
||||||
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
||||||
|
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"
|
||||||
|
|
||||||
|
cp ./Config/.zshrc ~/.zshrc
|
||||||
|
cp ./Config/.zshenv ~/.zshenv
|
||||||
|
|
||||||
|
# Rust
|
||||||
|
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
|
rustup toolchain install nightly
|
||||||
|
rustup +nightly component add rust-src
|
||||||
|
|
||||||
|
# ASDF
|
||||||
|
|
||||||
|
git clone https://github.com/asdf-vm/asdf ~/.asdf --branch v0.10.0
|
||||||
|
|
||||||
|
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 elixir https://github.com/asdf-vm/asdf-elixir
|
||||||
|
asdf plugin add golang https://github.com/kennyp/asdf-golang
|
||||||
|
asdf plugin add haskell https://github.com/vic/asdf-haskell
|
||||||
|
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby
|
||||||
|
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
|
||||||
|
|
||||||
|
# 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 apt update
|
||||||
|
sudo apt install docker-ce docker-ce-cli containerd.io
|
||||||
|
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
|
||||||
|
|
||||||
|
# SSH
|
||||||
|
|
||||||
|
mkdir ~/.ssh
|
||||||
|
cp ./Config/.ssh/config ~/.ssh/config
|
13
Config/.gitconfig
Normal file
13
Config/.gitconfig
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[filter "lfs"]
|
||||||
|
clean = git-lfs clean -- %f
|
||||||
|
smudge = git-lfs smudge -- %f
|
||||||
|
process = git-lfs filter-process
|
||||||
|
required = true
|
||||||
|
[user]
|
||||||
|
name = Werner
|
||||||
|
email = guilhermeqwerner@gmail.com
|
||||||
|
[core]
|
||||||
|
longpaths = true
|
||||||
|
fileMode = false
|
||||||
|
[init]
|
||||||
|
defaultBranch = "main"
|
3
Config/.ssh/config
Normal file
3
Config/.ssh/config
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Host *
|
||||||
|
AddKeysToAgent yes
|
||||||
|
IdentitiesOnly yes
|
3
Config/.wslconfig
Normal file
3
Config/.wslconfig
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[wsl2]
|
||||||
|
memory=8GB
|
||||||
|
processors=4
|
1
Config/.zshenv
Normal file
1
Config/.zshenv
Normal file
@ -0,0 +1 @@
|
|||||||
|
. "$HOME/.cargo/env"
|
33
Config/.zshrc
Normal file
33
Config/.zshrc
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
|
||||||
|
ZSH_THEME="spaceship"
|
||||||
|
|
||||||
|
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||||
|
|
||||||
|
SPACESHIP_PROMPT_ORDER=(
|
||||||
|
user
|
||||||
|
dir
|
||||||
|
host
|
||||||
|
git
|
||||||
|
exec_time
|
||||||
|
line_sep
|
||||||
|
jobs
|
||||||
|
exit_code
|
||||||
|
char
|
||||||
|
)
|
||||||
|
|
||||||
|
SPACESHIP_USER_SHOW=always
|
||||||
|
SPACESHIP_PROMPT_ADD_NEWLINE=false
|
||||||
|
SPACESHIP_PROMPT_SEPARATE_LINE=false
|
||||||
|
|
||||||
|
DISABLE_AUTO_TITLE="true"
|
||||||
|
|
||||||
|
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||||
|
|
||||||
|
plugins=(
|
||||||
|
asdf
|
||||||
|
git
|
||||||
|
zsh-autosuggestions
|
||||||
|
)
|
||||||
|
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"folders": [
|
|
||||||
{
|
|
||||||
"path": "."
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"settings": {}
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
[user]
|
|
||||||
name = GuilhermeWerner
|
|
||||||
email = 26710260+GuilhermeWerner@users.noreply.github.com
|
|
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2021 GuilhermeWerner
|
Copyright (c) 2022 GuilhermeWerner
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
cd ~
|
|
||||||
|
|
||||||
# Linux
|
|
||||||
|
|
||||||
if [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]
|
|
||||||
then
|
|
||||||
# Update System
|
|
||||||
|
|
||||||
sudo apt update
|
|
||||||
sudo apt upgrade -y
|
|
||||||
|
|
||||||
# Powershell
|
|
||||||
|
|
||||||
sudo apt install wget apt-transport-https software-properties-common -y
|
|
||||||
|
|
||||||
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
|
|
||||||
|
|
||||||
sudo dpkg -i packages-microsoft-prod.deb
|
|
||||||
|
|
||||||
sudo apt update
|
|
||||||
|
|
||||||
sudo add-apt-repository universe
|
|
||||||
sudo add-apt-repository multiverse
|
|
||||||
|
|
||||||
sudo apt update
|
|
||||||
|
|
||||||
sudo apt-get install powershell -y
|
|
||||||
|
|
||||||
# Mac
|
|
||||||
|
|
||||||
elif [ "$(uname)" = "Darwin" ]
|
|
||||||
then
|
|
||||||
echo "Mac"
|
|
||||||
fi
|
|
23
Zsh/.zshrc
23
Zsh/.zshrc
@ -1,23 +0,0 @@
|
|||||||
export ZSH="/home/guilherme/.oh-my-zsh"
|
|
||||||
|
|
||||||
ZSH_THEME="spaceship"
|
|
||||||
|
|
||||||
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
|
||||||
|
|
||||||
SPACESHIP_PROMPT_ORDER=(
|
|
||||||
user # Username section
|
|
||||||
dir # Current directory section
|
|
||||||
host # Hostname section
|
|
||||||
git # Git section (git_branch + git_status)
|
|
||||||
hg # Mercurial section (hg_branch + hg_status)
|
|
||||||
exec_time # Execution time
|
|
||||||
line_sep # Line break
|
|
||||||
vi_mode # Vi-mode indicator
|
|
||||||
jobs # Background jobs indicator
|
|
||||||
exit_code # Exit code section
|
|
||||||
char # Prompt character
|
|
||||||
)
|
|
||||||
|
|
||||||
SPACESHIP_USER_SHOW=always
|
|
||||||
SPACESHIP_PROMPT_ADD_NEWLINE=false
|
|
||||||
SPACESHIP_PROMPT_SEPARATE_LINE=false
|
|
Reference in New Issue
Block a user