57 lines
1.4 KiB
Bash
Executable File
57 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
echo "--- Installing essential pacman packages ---"
|
|
sudo pacman -S --noconfirm --needed \
|
|
base-devel \
|
|
git \
|
|
lazygit \
|
|
starship
|
|
|
|
if ! command -v yay &> /dev/null; then
|
|
echo "--- yay not found, installing... ---"
|
|
git clone https://aur.archlinux.org/yay.git /tmp/yay
|
|
(cd /tmp/yay && makepkg -si --noconfirm)
|
|
rm -rf /tmp/yay
|
|
else
|
|
echo "--- yay is already installed. ---"
|
|
fi
|
|
|
|
echo "--- Installing AUR and official repository packages with yay ---"
|
|
yay -S --noconfirm --needed \
|
|
niri \
|
|
swayidle \
|
|
swaylock-effects \
|
|
waybar \
|
|
swaync \
|
|
wlogout \
|
|
ttf-firacode-nerd \
|
|
neovim \
|
|
htop \
|
|
nvtop \
|
|
yazi \
|
|
firefox
|
|
|
|
echo "--- Copying configuration files from ~/Dotfiles ---"
|
|
if [ -d "$HOME/Dotfiles" ]; then
|
|
cp -r "$HOME/Dotfiles/.config/"* "$HOME/.config/"
|
|
|
|
cp "$HOME/Dotfiles/.bashrc" "$HOME/.bashrc"
|
|
|
|
mkdir -p "$HOME/wallpapers"
|
|
cp -r "$HOME/Dotfiles/wallpapers/"* "$HOME/wallpapers/"
|
|
else
|
|
echo "WARNING: ~/Dotfiles directory not found. Skipping config installation."
|
|
fi
|
|
|
|
echo "--- Configuring Git and SSH ---"
|
|
git config --global user.name "adrien"
|
|
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 ""
|
|
else
|
|
echo "--- SSH key already exists, skipping generation. ---"
|
|
fi |