diff --git a/.gitattributes b/.gitattributes index 5a0d5e4..6313b56 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1 @@ -# Auto detect text files and perform LF normalization * text=auto eol=lf diff --git a/.gitignore b/.gitignore index c776bdf..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +0,0 @@ -*.deb \ No newline at end of file diff --git a/Bootstrap.ps1 b/Bootstrap.ps1 deleted file mode 100644 index c39b55c..0000000 --- a/Bootstrap.ps1 +++ /dev/null @@ -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 - -} \ No newline at end of file diff --git a/Bootstrap.sh b/Bootstrap.sh new file mode 100644 index 0000000..3c766ed --- /dev/null +++ b/Bootstrap.sh @@ -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 diff --git a/Config/.gitconfig b/Config/.gitconfig new file mode 100644 index 0000000..be83608 --- /dev/null +++ b/Config/.gitconfig @@ -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" diff --git a/Config/.ssh/config b/Config/.ssh/config new file mode 100644 index 0000000..ba9b986 --- /dev/null +++ b/Config/.ssh/config @@ -0,0 +1,3 @@ +Host * + AddKeysToAgent yes + IdentitiesOnly yes diff --git a/Config/.wslconfig b/Config/.wslconfig new file mode 100644 index 0000000..185ba4c --- /dev/null +++ b/Config/.wslconfig @@ -0,0 +1,3 @@ +[wsl2] +memory=8GB +processors=4 diff --git a/Config/.zshenv b/Config/.zshenv new file mode 100644 index 0000000..c2f3182 --- /dev/null +++ b/Config/.zshenv @@ -0,0 +1 @@ +. "$HOME/.cargo/env" diff --git a/Config/.zshrc b/Config/.zshrc new file mode 100644 index 0000000..e1644d6 --- /dev/null +++ b/Config/.zshrc @@ -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 diff --git a/DotFiles.code-workspace b/DotFiles.code-workspace deleted file mode 100644 index db0fd4e..0000000 --- a/DotFiles.code-workspace +++ /dev/null @@ -1,8 +0,0 @@ -{ - "folders": [ - { - "path": "." - } - ], - "settings": {} -} diff --git a/Git/.gitconfig b/Git/.gitconfig deleted file mode 100644 index 13faf37..0000000 --- a/Git/.gitconfig +++ /dev/null @@ -1,3 +0,0 @@ -[user] - name = GuilhermeWerner - email = 26710260+GuilhermeWerner@users.noreply.github.com diff --git a/LICENSE.md b/LICENSE.md index 4b939d7..c0d48c0 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 GuilhermeWerner +Copyright (c) 2022 GuilhermeWerner Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Powershell.sh b/Powershell.sh deleted file mode 100644 index 5f2b0ff..0000000 --- a/Powershell.sh +++ /dev/null @@ -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 diff --git a/README.md b/README.md index 34c06ea..f40ecb6 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# DotFiles +# Dot Files diff --git a/Zsh/.zshrc b/Zsh/.zshrc deleted file mode 100644 index c7a8ce8..0000000 --- a/Zsh/.zshrc +++ /dev/null @@ -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