Add bootstrap

This commit is contained in:
Ethan Lane 2025-02-21 07:46:27 +00:00
parent de37fba59c
commit f17bfe7726
15 changed files with 141 additions and 0 deletions

30
.config/yadm/bootstrap Executable file
View file

@ -0,0 +1,30 @@
#!/bin/bash
# Save this file as ~/.config/yadm/bootstrap and make it executable. It will
# execute all executable files (excluding templates and editor backups) in the
# ~/.config/yadm/bootstrap.d directory when run.
set -eu
# Directory to look for bootstrap executables in
BOOTSTRAP_D="${BASH_SOURCE[0]}.d"
if [[ ! -d "$BOOTSTRAP_D" ]]; then
echo "Error: bootstrap directory '$BOOTSTRAP_D' not found" >&2
exit 1
fi
declare -a bootstraps
while IFS= read -r bootstrap; do
if [[ -x "$bootstrap" && ! "$bootstrap" =~ "##" && ! "$bootstrap" =~ ~$ ]]; then
bootstraps+=("$bootstrap")
fi
done < <(find -L "$BOOTSTRAP_D" -type f | sort)
for bootstrap in "${bootstraps[@]}"; do
if ! "$bootstrap"; then
echo "Error: bootstrap '$bootstrap' failed" >&2
exit 1
fi
done

View file

@ -0,0 +1,11 @@
#!/bin/bash
if pacman -Q paru; then
exit 0
fi
sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/paru.git /tmp/paru
cd /tmp/paru
makepkg -si
cd
rm -rf /tmp/paru

View file

@ -0,0 +1,8 @@
#!/bin/bash
while read -r line; do
if paru -Q $line; then
echo "$line installed"
else
paru -S --noconfirm $line
fi
done <$HOME/.config/yadm/files/packages.txt

View file

@ -0,0 +1,8 @@
#!/bin/bash
if [ $SHELL = '/bin/zsh' ]; then
exit 0
else
chsh --shell /bin/zsh
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
fi

View file

@ -0,0 +1,9 @@
#!/bin/bash
if pacman -Q docker; then
exit 0
else
sudo pacman -S --noconfirm docker
sudo usermod -aG docker vylpes
sudo systemctl enable --now docker
fi

View file

@ -0,0 +1,6 @@
#!/bin/bash
if [ $(cat /etc/pam.d/login | grep pam_gnome_keyring.so | wc -l) = "0" ]; then
sudo cp $HOME/.config/yadm/files/login /etc/pam.d/login
else
exit 0
fi

View file

@ -0,0 +1,5 @@
#!/bin/bash
mkdir -p $HOME/Documents
mkdir -p $HOME/Downloads
mkdir -p $HOME/Desktop
mkdir -p $HOME/Pictures/captures

View file

@ -0,0 +1,9 @@
#!/bin/bash
if pacman -Q virt-manager; then
exit 0
else
sudo pacman -S --noconfirm virt-manager
sudo systemctl enable --now libvirtd.socket
sudo usermod -aG libvirt vylpes
fi

View file

@ -0,0 +1,5 @@
#!/bin/bash
if command -v nvim >/dev/null 2>&1; then
nvim '+PlugInstall' '+qall'
fi

View file

@ -0,0 +1,6 @@
#!/bin/bash
if command -v nvm >/dev/null 2>&1; then
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
else
exit 0
fi

View file

@ -0,0 +1 @@
#!/bin/bash

View file

@ -0,0 +1 @@
yadm remote set-url origin "ssh://git@ssh.git.vylpes.xyz:222/Vylpes/dotfiles.git"

9
.config/yadm/files/login Normal file
View file

@ -0,0 +1,9 @@
#%PAM-1.0
auth requisite pam_nologin.so
auth include system-local-login
auth optional pam_gnome_keyring.so
account include system-local-login
session include system-local-login
session optional pam_gnome_keyring.so auto_start
password include system-local-login

View file

@ -0,0 +1,29 @@
alacritty
arandr
autorandr
cups
discord
dunst
firefox
flameshot
gnome-keyring
i3-wm
i3lock
keepassxc
keepmenu
nextcloud-client
nitrogen
noto-fonts-emoji
pavucontrol
playerctl
pulseaudio-control
picom
polybar
rofi
tldr
ttf-font-awesome
ttf-hack
xclip
xorg-xinit
yt-dlp
zsh

4
.zshrc
View file

@ -15,3 +15,7 @@ alias lss="ls -lah"
alias gco="git checkout"
alias gcm="git commit -m"
alias gss="git status -s"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion