From 8df246c058a349c7b6d62514d23abeb539b8c5ff Mon Sep 17 00:00:00 2001 From: Trevor Merritt Date: Sat, 13 Jul 2024 14:49:42 -0400 Subject: [PATCH] Adds basic rust setup removes kotlin stuff. --- configs/vscode/environments.txt | 2 +- configs/zsh/configs/console_dev.zsh | 7 +++++++ configs/zsh/configs/java.zsh | 5 +++++ configs/zsh/zshrc | 20 ++------------------ install.conf.yaml | 4 ++++ scripts/installPackages.sh | 2 +- scripts/setupKubectl.sh | 16 ---------------- scripts/setupRust.sh | 17 +++++++++++++++++ 8 files changed, 37 insertions(+), 36 deletions(-) create mode 100644 configs/zsh/configs/console_dev.zsh create mode 100644 configs/zsh/configs/java.zsh create mode 100755 scripts/setupRust.sh diff --git a/configs/vscode/environments.txt b/configs/vscode/environments.txt index be6fdc6..46cdffb 100644 --- a/configs/vscode/environments.txt +++ b/configs/vscode/environments.txt @@ -1,3 +1,3 @@ generic -kotlin platformio +rust diff --git a/configs/zsh/configs/console_dev.zsh b/configs/zsh/configs/console_dev.zsh new file mode 100644 index 0000000..a8f6a5a --- /dev/null +++ b/configs/zsh/configs/console_dev.zsh @@ -0,0 +1,7 @@ + +# Add PS4 SDK +export OO_PS4_TOOLCHAIN=/opt/ps4/OpenOrbis/PS4Toolchain + +# Setup vitasdk +export VITASDK=/usr/local/vitasdk +export PATH="$VITASDK/bin:$PATH" diff --git a/configs/zsh/configs/java.zsh b/configs/zsh/configs/java.zsh new file mode 100644 index 0000000..750a804 --- /dev/null +++ b/configs/zsh/configs/java.zsh @@ -0,0 +1,5 @@ + +# Add GraalVM +export GRAALVM_HOME=/opt/graalvm + +export JAVA_HOME=/home/tmerritt/.sdkman/candidates/java/current/bin/java diff --git a/configs/zsh/zshrc b/configs/zsh/zshrc index 9d477ca..9208781 100644 --- a/configs/zsh/zshrc +++ b/configs/zsh/zshrc @@ -35,7 +35,7 @@ ZSH_THEME="jonathan" # export UPDATE_ZSH_DAYS=13 # Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" +DISABLE_MAGIC_FUNCTIONS="true" # Uncomment the following line to disable colors in ls. # DISABLE_LS_COLORS="true" @@ -49,7 +49,7 @@ ENABLE_CORRECTION="true" # Uncomment the following line to display red dots whilst waiting for completion. # Caution: this setting can cause issues with multiline prompts (zsh 5.7.1 and newer seem to work) # See https://github.com/ohmyzsh/ohmyzsh/issues/5765 -# COMPLETION_WAITING_DOTS="true" +COMPLETION_WAITING_DOTS="true" # Uncomment the following line if you want to disable marking untracked files # under VCS as dirty. This makes repository status check for large repositories @@ -146,28 +146,12 @@ _load_settings "$HOME/.zsh/configs" # aliases [[ -f ~/.aliases ]] && source ~/.aliases - -# ADD Krew -export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" - # Add NPM export PATH="$PATH:/opt/node/bin" # Add Local scripts export PATH="$HOME/.local/bin:$PATH" -# Add PS4 SDK -export OO_PS4_TOOLCHAIN=/opt/ps4/OpenOrbis/PS4Toolchain - -# Add GraalVM -export GRAALVM_HOME=/opt/graalvm - -export JAVA_HOME=/home/tmerritt/.sdkman/candidates/java/current/bin/java - -# Setup vitasdk -export VITASDK=/usr/local/vitasdk -export PATH="$VITASDK/bin:$PATH" - #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! export SDKMAN_DIR="$HOME/.sdkman" [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" diff --git a/install.conf.yaml b/install.conf.yaml index 17f51e4..055f2bf 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -54,6 +54,10 @@ ] - [git submodule update --init --recursive, Installing submodules] - [fc-cache -fv, Updating Font Cache] + - [ + ~/.dotfiles/scripts/setupRust.sh, + Setting up Rust, + ] #- git: # "/home/tmerritt/Projects/dfr": # url: "https://git.pyrocode.xyz/tmerritt/dfr.git" diff --git a/scripts/installPackages.sh b/scripts/installPackages.sh index 5e770fa..cfc4f02 100755 --- a/scripts/installPackages.sh +++ b/scripts/installPackages.sh @@ -4,4 +4,4 @@ sudo apt install \ remmina remmina-plugin-vnc remmina-plugin-rdp \ zsh zsh-syntax-highlighting \ - nmap tmux nmon htop -y + nmap tmux nmon htop sccache -y diff --git a/scripts/setupKubectl.sh b/scripts/setupKubectl.sh index 2798ff9..93f1e85 100755 --- a/scripts/setupKubectl.sh +++ b/scripts/setupKubectl.sh @@ -7,19 +7,3 @@ echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https:/ sudo apt-get update sudo apt-get install -y kubectl - -( - set -x; cd "$(mktemp -d)" && - OS="$(uname | tr '[:upper:]' '[:lower:]')" && - ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" && - KREW="krew-${OS}_${ARCH}" && - curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" && - tar zxvf "${KREW}.tar.gz" && - ./"${KREW}" install krew -) - -for n in $(cat ~/.dotfiles/scripts/krew.plugins.txt) -do - echo "Installing $n" - kubectl krew install "$n" -done \ No newline at end of file diff --git a/scripts/setupRust.sh b/scripts/setupRust.sh new file mode 100755 index 0000000..077c240 --- /dev/null +++ b/scripts/setupRust.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +echo Setting up Rust dev environment + +sudo apt install lcov grcov + +# update with rustup +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y -q + +# Add source to rustup +rustup component add rust-src + +# Add coverage assistance +rustup component add llvm-tools-preview + +# Installing Cargo plugins. +cargo install cargo-cache