1
0

Simplify install.sh

This commit is contained in:
Adrien Bouvais 2025-10-08 06:45:27 +00:00
parent a5d5d63f52
commit d583b524d6

View File

@ -2,25 +2,18 @@
set -e set -e
echo "--- Installing essential pacman packages ---"
sudo pacman -S --noconfirm --needed \ sudo pacman -S --noconfirm --needed \
niri \
base-devel \ base-devel \
git \ git \
lazygit \ lazygit \
starship starship
if ! command -v yay &> /dev/null; then
echo "--- yay not found, installing... ---"
git clone https://aur.archlinux.org/yay.git /tmp/yay git clone https://aur.archlinux.org/yay.git /tmp/yay
(cd /tmp/yay && makepkg -si --noconfirm) (cd /tmp/yay && makepkg -si --noconfirm)
rm -rf /tmp/yay rm -rf /tmp/yay
else
echo "--- yay is already installed. ---"
fi
echo "--- Installing AUR and official repository packages with yay ---"
yay -S --noconfirm --needed \ yay -S --noconfirm --needed \
niri \
swayidle \ swayidle \
swaylock-effects \ swaylock-effects \
waybar \ waybar \
@ -28,30 +21,19 @@ yay -S --noconfirm --needed \
wlogout \ wlogout \
ttf-firacode-nerd \ ttf-firacode-nerd \
neovim \ neovim \
htop \
nvtop \
yazi \ yazi \
firefox firefox
echo "--- Copying configuration files from ~/Dotfiles ---" mkdir -p "$HOME/tmp"
if [ -d "$HOME/Dotfiles" ]; then git clone https://git.bouvais.lu/adrien/Dotfiles "/tmp/dotfiles" --depth 1
cp -r "$HOME/Dotfiles/.config/"* "$HOME/.config/"
cp "$HOME/Dotfiles/.bashrc" "$HOME/.bashrc"
cp -r "/tmp/dotfiles/.config/"* "$HOME/.config/"
cp "/tmp/dotfiles/.bashrc" "$HOME/.bashrc"
mkdir -p "$HOME/wallpapers" mkdir -p "$HOME/wallpapers"
cp -r "$HOME/Dotfiles/wallpapers/"* "$HOME/wallpapers/" cp -r "/tmp/dotfiles/wallpapers/"* "$HOME/wallpapers/"
else
echo "WARNING: ~/Dotfiles directory not found. Skipping config installation." rm -rf /tmp/yay
fi
echo "--- Configuring Git and SSH ---"
git config --global user.name "adrien" git config --global user.name "adrien"
git config --global user.email "git@bouvais.lu" git config --global user.email "git@bouvais.lu"
if [ ! -f "$HOME/.ssh/id_rsa" ]; then
echo "--- Generating a new SSH key ---"
ssh-keygen -t rsa -b 4096 -C "git@bouvais.com" -f "$HOME/.ssh/id_rsa" -N "" ssh-keygen -t rsa -b 4096 -C "git@bouvais.com" -f "$HOME/.ssh/id_rsa" -N ""
else
echo "--- SSH key already exists, skipping generation. ---"
fi