Simplify install.sh
This commit is contained in:
parent
a5d5d63f52
commit
d583b524d6
42
install.sh
42
install.sh
@ -2,25 +2,18 @@
|
||||
|
||||
set -e
|
||||
|
||||
echo "--- Installing essential pacman packages ---"
|
||||
sudo pacman -S --noconfirm --needed \
|
||||
niri \
|
||||
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
|
||||
git clone https://aur.archlinux.org/yay.git /tmp/yay
|
||||
(cd /tmp/yay && makepkg -si --noconfirm)
|
||||
rm -rf /tmp/yay
|
||||
|
||||
echo "--- Installing AUR and official repository packages with yay ---"
|
||||
yay -S --noconfirm --needed \
|
||||
niri \
|
||||
swayidle \
|
||||
swaylock-effects \
|
||||
waybar \
|
||||
@ -28,30 +21,19 @@ yay -S --noconfirm --needed \
|
||||
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/"
|
||||
mkdir -p "$HOME/tmp"
|
||||
git clone https://git.bouvais.lu/adrien/Dotfiles "/tmp/dotfiles" --depth 1
|
||||
|
||||
cp "$HOME/Dotfiles/.bashrc" "$HOME/.bashrc"
|
||||
cp -r "/tmp/dotfiles/.config/"* "$HOME/.config/"
|
||||
cp "/tmp/dotfiles/.bashrc" "$HOME/.bashrc"
|
||||
mkdir -p "$HOME/wallpapers"
|
||||
cp -r "/tmp/dotfiles/wallpapers/"* "$HOME/wallpapers/"
|
||||
|
||||
mkdir -p "$HOME/wallpapers"
|
||||
cp -r "$HOME/Dotfiles/wallpapers/"* "$HOME/wallpapers/"
|
||||
else
|
||||
echo "WARNING: ~/Dotfiles directory not found. Skipping config installation."
|
||||
fi
|
||||
rm -rf /tmp/yay
|
||||
|
||||
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
|
||||
ssh-keygen -t rsa -b 4096 -C "git@bouvais.com" -f "$HOME/.ssh/id_rsa" -N ""
|
||||
Loading…
x
Reference in New Issue
Block a user