Reattach tmux + headless install

This commit is contained in:
2025-09-22 10:16:55 +00:00
parent 432bd834d5
commit 5b747f1c9f
2 changed files with 41 additions and 24 deletions

View File

@@ -185,5 +185,7 @@ export ompPath="$HOME/.config/oh-my-posh/theme.omp.json"
### Start oh my posh
eval "$(oh-my-posh init bash --config $ompPath)"
### Start tmux if not already in a session
[[ -z "$TMUX" ]] && exec tmux
if [[ -z "$TMUX" ]]; then
tmux attach || tmux new
fi
. "$HOME/.cargo/env"

View File

@@ -1,15 +1,48 @@
graphical=false
for arg in "$@"; do
if [[ $arg == "--graphical" ]]; then
graphical=true
break
fi
done
sudo apt update
sudo apt install \
feh \
wget \
curl \
neofetch \
bashtop \
htop \
build-essential \
cmake \
pkg-config \
python3 \
wireguard \
-y
# Dependencies for cargo
sudo snap install rustup --classic
rustup default stable
rustup update
# Oh my posh
curl -s https://ohmyposh.dev/install.sh | sudo bash -s
# Node version manager
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# Install nvim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
sudo rm -rf /opt/nvim
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
if $graphical; then
sudo apt install \
i3 \
i3blocks \
i3lock \
suckless-tools \
arandr \
feh \
scrot \
wget \
gnupg2 \
gnupg-agent \
dirmngr \
@@ -21,23 +54,14 @@ sudo apt install \
yubikey-personalization \
solaar \
cifs-utils \
curl \
rofi \
brightnessctl \
neofetch \
bashtop \
htop \
build-essential \
cmake \
pkg-config \
libfreetype6-dev \
libfontconfig1-dev \
libxcb-xfixes0-dev \
libxkbcommon-dev \
python3 \
dunst \
nvme-cli \
wireguard \
-y
# Remove ibus since it causes issues with my custom keyboard layout
@@ -59,19 +83,12 @@ sudo snap install heroic
sudo snap install freecad
sudo snap install thunderbird
# Dependencies for cargo
sudo snap install rustup --classic
rustup default stable
rustup update
# Cargo packages
## Alacritty needs to be installed with cargo to get the version that supports toml configurations
cargo install alacritty
cargo install battop
curl -s https://ohmyposh.dev/install.sh | sudo bash -s
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# Access to brightness devices for brightnessctl
sudo usermod -aG video wholteza
@@ -81,11 +98,9 @@ gpg --decrypt /home/wholteza/.config/wireguard/got58-got80.conf.gpg > /home/whol
# Xorg configs
sudo cp /home/wholteza/.config/X11/xorg.conf.d/* /etc/X11/xorg.conf.d/
# Install nvim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
sudo rm -rf /opt/nvim
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
fi
source ~/.bashrc
echo Done!