Add bootstrap
This commit is contained in:
parent
de37fba59c
commit
f17bfe7726
15 changed files with 141 additions and 0 deletions
30
.config/yadm/bootstrap
Executable file
30
.config/yadm/bootstrap
Executable 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
|
||||||
|
|
11
.config/yadm/bootstrap.d/01-paru
Executable file
11
.config/yadm/bootstrap.d/01-paru
Executable 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
|
8
.config/yadm/bootstrap.d/02-packages
Executable file
8
.config/yadm/bootstrap.d/02-packages
Executable 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
|
8
.config/yadm/bootstrap.d/03-shell
Executable file
8
.config/yadm/bootstrap.d/03-shell
Executable 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
|
9
.config/yadm/bootstrap.d/04-docker
Executable file
9
.config/yadm/bootstrap.d/04-docker
Executable 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
|
6
.config/yadm/bootstrap.d/05-gnome-keyring
Executable file
6
.config/yadm/bootstrap.d/05-gnome-keyring
Executable 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
|
5
.config/yadm/bootstrap.d/06-files
Executable file
5
.config/yadm/bootstrap.d/06-files
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
mkdir -p $HOME/Documents
|
||||||
|
mkdir -p $HOME/Downloads
|
||||||
|
mkdir -p $HOME/Desktop
|
||||||
|
mkdir -p $HOME/Pictures/captures
|
9
.config/yadm/bootstrap.d/07-qemu
Executable file
9
.config/yadm/bootstrap.d/07-qemu
Executable 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
|
5
.config/yadm/bootstrap.d/08-nvim
Executable file
5
.config/yadm/bootstrap.d/08-nvim
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if command -v nvim >/dev/null 2>&1; then
|
||||||
|
nvim '+PlugInstall' '+qall'
|
||||||
|
fi
|
6
.config/yadm/bootstrap.d/09-node
Executable file
6
.config/yadm/bootstrap.d/09-node
Executable 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
|
1
.config/yadm/bootstrap.d/2q
Normal file
1
.config/yadm/bootstrap.d/2q
Normal file
|
@ -0,0 +1 @@
|
||||||
|
#!/bin/bash
|
1
.config/yadm/bootstrap.d/99-yadm
Executable file
1
.config/yadm/bootstrap.d/99-yadm
Executable 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
9
.config/yadm/files/login
Normal 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
|
29
.config/yadm/files/packages.txt
Normal file
29
.config/yadm/files/packages.txt
Normal 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
4
.zshrc
|
@ -15,3 +15,7 @@ alias lss="ls -lah"
|
||||||
alias gco="git checkout"
|
alias gco="git checkout"
|
||||||
alias gcm="git commit -m"
|
alias gcm="git commit -m"
|
||||||
alias gss="git status -s"
|
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
|
||||||
|
|
Loading…
Reference in a new issue