Simplify install.sh
This commit is contained in:
parent
a5d5d63f52
commit
d583b524d6
42
install.sh
42
install.sh
@ -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
|
git clone https://aur.archlinux.org/yay.git /tmp/yay
|
||||||
echo "--- yay not found, installing... ---"
|
(cd /tmp/yay && makepkg -si --noconfirm)
|
||||||
git clone https://aur.archlinux.org/yay.git /tmp/yay
|
rm -rf /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 \
|
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"
|
||||||
|
cp -r "/tmp/dotfiles/wallpapers/"* "$HOME/wallpapers/"
|
||||||
|
|
||||||
mkdir -p "$HOME/wallpapers"
|
rm -rf /tmp/yay
|
||||||
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.name "adrien"
|
||||||
git config --global user.email "git@bouvais.lu"
|
git config --global user.email "git@bouvais.lu"
|
||||||
|
ssh-keygen -t rsa -b 4096 -C "git@bouvais.com" -f "$HOME/.ssh/id_rsa" -N ""
|
||||||
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
|
|
||||||
Loading…
x
Reference in New Issue
Block a user