From 3082e0e81df50929c92d0c8d66f660b408a9360f Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Wed, 4 Jun 2025 22:46:27 +0300 Subject: [PATCH] Use APT to install the rust toolchain --- .bashrc | 1 - .config/setup/01-install-packages.sh | 4 ++++ .config/setup/21-install-rustup.sh | 3 --- .local/bin/upgrade | 1 - .profile | 5 ++++- 5 files changed, 8 insertions(+), 6 deletions(-) delete mode 100755 .config/setup/21-install-rustup.sh diff --git a/.bashrc b/.bashrc index 2c1d8a2..77c1ee3 100755 --- a/.bashrc +++ b/.bashrc @@ -125,7 +125,6 @@ fi # Hook up direnv eval "$(direnv hook bash)" -. "$HOME/.cargo/env" # Tell GPG in where to open the pinentry dialog GPG_TTY="$(tty)" diff --git a/.config/setup/01-install-packages.sh b/.config/setup/01-install-packages.sh index be0e298..4cf45c9 100755 --- a/.config/setup/01-install-packages.sh +++ b/.config/setup/01-install-packages.sh @@ -9,6 +9,8 @@ black \ bluez \ borgbackup \ build-essential \ +cargo \ +cargo-doc \ curl \ direnv \ docker.io \ @@ -51,6 +53,8 @@ python3-pylsp-rope \ python3.12-venv \ qtwayland5 \ reuse \ +rust-doc \ +rust-llvm \ shellcheck \ slurp \ software-properties-common \ diff --git a/.config/setup/21-install-rustup.sh b/.config/setup/21-install-rustup.sh deleted file mode 100755 index 001f27c..0000000 --- a/.config/setup/21-install-rustup.sh +++ /dev/null @@ -1,3 +0,0 @@ -#! /usr/bin/sh - -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y diff --git a/.local/bin/upgrade b/.local/bin/upgrade index 65af1db..768aa95 100755 --- a/.local/bin/upgrade +++ b/.local/bin/upgrade @@ -22,6 +22,5 @@ pipx_update() { apt_update pipx_update -rustup update cargo_update ghup diff --git a/.profile b/.profile index dae4993..af21ce4 100644 --- a/.profile +++ b/.profile @@ -21,6 +21,10 @@ if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi +if [ -d "$HOME/.cargo/bin" ] ; then + PATH="$HOME/.cargo/bin:$PATH" +fi + # set PATH so it includes user's private bin if it exists if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" @@ -37,7 +41,6 @@ export BORG_REPO="/media/backup/" export BORG_PASSCOMMAND="cat ${HOME}/.keys/borg-passphrase.txt" export PYTHON_KEYRING_BACKEND="keyring.backends.null.Keyring" export XDG_CURRENT_DESKTOP="sway" -. "$HOME/.cargo/env" # If running from tty1 start sway inside a zellij session [ "$(tty)" = "/dev/tty1" ] && exec zellij --layout sway --session sway