huge update to ygdra

This commit is contained in:
2026-08-31 21:36:47 -04:00
parent 39cfac6073
commit 218bc783e1
2 changed files with 258 additions and 99 deletions
+2
View File
@@ -0,0 +1,2 @@
#!/usr/bin/fish
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
+256 -99
View File
@@ -2,11 +2,13 @@
# ==============================================================================
# Auth: alex
# File: ygdra.sh
# Revn: 07-06-2026 1.0 WIP
# Revn: 08-29-2026 0.1.7
# Func: terraform a fresh OS install
#
# TODO: pattern matching/S&R with symlinks?
# fish config
# TODO: add default dry-run
# announce package before installation
# pattern matching/S&R with symlinks?
# look into exactly what archinstall doesn't give you
# check $SHELL ( this works )
# check $TERM
# git clones
@@ -15,6 +17,7 @@
# create configs for like most of the users
# system config
# test
# download and install batman beyond font pack
# ==============================================================================
# CHANGE LOG
# ------------------------------------------------------------------------------
@@ -57,6 +60,30 @@
# 07-04-2026: added manhunter to user list (minipc server)
#*07-06-2026: added exit statement before symlinks, testing on cachy
# server
# fixed -eq bug in bash if statement
# added automatic installation flag
# 07-07-2026: added just to arch and cachy general install
# moved alacritty from arch general to arch user and
# poweruser
# added man and git to arch general install
# 07-08-2026: added vim to arch general install
# added Documents, Projects, and Utilities directories in
# arch
# 07-11-2026: added arch config sed command that switches pacman into
# waka waka mode
# added htop install for rpi and ubuntu
# added btop install for arch
# 07-14-2026: added arch install i3 etc for mcginnis
# added arch install niri/noctalia etc for grayson and
# drake
# 08-15-2026: removed fuckass -r from ln
# added tldr ( tealdeer ) to general install
# added eza and openssh to arch install
# fixed batman-beyond config installs
# began making placeholder config installs
# 08-28-2026: commented out balena for the time being
# added dynu.sh, .service, and .timer to general server
# 08-29-2026: added fisher install to arch
#
# ==============================================================================
@@ -71,13 +98,13 @@
# ------------------------------------------------------------------------------
# U config(gh)
# ------------------------------------------------------------------------------
# all
# all fish-pure-prompt
# ==============================================================================
# TODO i'm certain there's a better way to do this
CWD=$( pwd )
# TODO filter out the obvious part
RELEASE=$( cat /etc/os-release | grep -i "id=" )
RELEASE=$( cat /etc/os-release | grep -i "^id=" )
OS=""
INS=""
FLAG=""
@@ -89,30 +116,42 @@ case $RELEASE in
INS="pacman"
INS2="paru"
FLAG="-S"
NOCONF="--noconfirm"
;;
*arch)
OS="arch"
INS="pacman"
INS2="paru"
FLAG="-S"
NOCONF="--noconfirm"
;;
*raspbian | *debian)
OS="rpi"
INS="apt"
FLAG="install"
NOCONF="--yes"
;;
*ubuntu)
OS="ubuntu"
INS="apt"
FLAG="install"
NOCONF="--yes"
;;
*) # default
OS="unknown"
INS="unknown"
FLAG="unknown"
NOCONF="unknown"
;;
esac
echo "OS = $OS"
echo "INS = $INS"
echo "FLAG = $FLAG"
echo "NOCONF = $NOCONF"
read
# system update
case $OS in
cachyos | arch)
@@ -147,6 +186,10 @@ case $MODE_DIRTY in
;;
esac
echo "MODE = $MODE"
read
# get user info
echo "select user from list:"
#echo " 1) batman/wayne"
@@ -157,10 +200,11 @@ echo " 5) red-robin/drake"
#echo " 6) robin/wayne"
echo " 7) oracle/gordon"
echo " 8) manhunter"
echo " 9) zeta"
#echo " 9) zeta"
#echo " 10) oracle/smoak"
#echo " 11) joker"
#echo " 12) owlman"
#echo " W) wayne-tech"
echo "[default: no user]: "
read USER_DIRTY
@@ -175,10 +219,16 @@ case $USER_DIRTY in
;;
esac
echo "USER = $USER"
read
# RPI
# rpi specific install
if [[ $OS -eq "rpi" ]]; then
$INS $FLAG vim
$INS $FLAG nmap
if [[ $OS = "rpi" ]]; then
$INS $NOCONF $FLAG vim
$INS $NOCONF $FLAG nmap
$INS $NOCONF $FLAG htop # might already exist
# install golang
mkdir -p ~/Documents/golang
@@ -208,7 +258,10 @@ if [[ $OS -eq "rpi" ]]; then
# install fish
apt-add-repository ppa:fish-shell/release-3
$INS update
$INS $FLAG fish
$INS $NOCONF $FLAG fish
# change shell to fish
chsh -s /usr/bin/fish
# install onefetch
cargo install onefetch
@@ -220,7 +273,7 @@ if [[ $OS -eq "rpi" ]]; then
## user specific rpi install
## operating mode (server) specific rpi install
if [[ $MODE -eq 2 ]]; then
#$INS $FLAG pihole
#$INS $NOCONF $FLAG pihole
# install gitea
cd ~/Documents
@@ -252,10 +305,12 @@ if [[ $OS -eq "rpi" ]]; then
fi
# UBUNTU
#ubuntu specific install
if [[ $OS -eq "ubuntu" ]]; then
$INS $FLAG vim
$INS $FLAG nmap
if [[ $OS = "ubuntu" ]]; then
$INS $NOCONF $FLAG vim
$INS $NOCONF $FLAG nmap
$INS $NOCONF $FLAG htop # might already exist
# install golang
mkdir -p ~/Documents/golang
@@ -285,7 +340,7 @@ if [[ $OS -eq "ubuntu" ]]; then
# install fish
apt-add-repository ppa:fish-shell/release-3
$INS update
$INS $FLAG fish
$INS $NOCONF $FLAG fish
# install onefetch
cargo install onefetch
@@ -297,7 +352,7 @@ if [[ $OS -eq "ubuntu" ]]; then
## user specific ubuntu install
## operating mode (server) specific ubuntu install
if [[ $MODE -eq 2 ]]; then
#$INS $FLAG pihole
#$INS $NOCONF $FLAG pihole
# install gitea
cd ~/Documents
git clone https://github.com/go-gitea/gitea
@@ -323,17 +378,17 @@ if [[ $OS -eq "ubuntu" ]]; then
gitea completion bash # TODO update to fish
elif [[ $MODE -eq 1 ]]; then
$INS $FLAG alacritty
$INS $NOCONF $FLAG alacritty
# install zen
curl -fsSL https://github.com/zen-browser/updates-server/raw/refs/heads/main/install.sh | sh
elif [[ $MODE -eq 3 ]]; then
$INS $FLAG alacritty
$INS $NOCONF $FLAG alacritty
# install discord
wget https://palfrey.github.io/discord-apt/discord-repo_1.2_all.deb
sudo dpkg -i discord-repo_1.2_all.deb
sudo apt-get update
$INS $FLAG fonts-noto-color-emoji
$INS $FLAG discord
$INS $NOCONF $FLAG fonts-noto-color-emoji
$INS $NOCONF $FLAG discord
# install zen
curl -fsSL https://github.com/zen-browser/updates-server/raw/refs/heads/main/install.sh | sh
fi
@@ -341,18 +396,29 @@ if [[ $OS -eq "ubuntu" ]]; then
fi
# ARCH
# arch specific install
if [[ $OS -eq "arch" ]]; then
$INS $FLAG vim
$INS $FLAG fastfetch
$INS $FLAG go
$INS $FLAG zig
$INS $FLAG julia
$INS $FLAG alacritty
$INS $FLAG rust
$INS $FLAG nmap
$INS $FLAG onefetch
$INS $FLAG fish
if [[ $OS = "arch" ]]; then
$INS $NOCONF $FLAG man
$INS $NOCONF $FLAG git
$INS $NOCONF $FLAG vim
$INS $NOCONF $FLAG fastfetch
$INS $NOCONF $FLAG go
$INS $NOCONF $FLAG zig
$INS $NOCONF $FLAG julia
$INS $NOCONF $FLAG rust
$INS $NOCONF $FLAG nmap
$INS $NOCONF $FLAG onefetch
$INS $NOCONF $FLAG fish
$INS $NOCONF $FLAG just
$INS $NOCONF $FLAG btop
$INS $NOCONF $FLAG eza
$INS $NOCONF $FLAG openssh
$INS $NOCONF $FLAG fisher
mkdir ~/Documents
mkdir ~/Projects
mkdir ~/Pictures
# install paru
mkdir -p ~/Documents/paru/src
@@ -365,36 +431,58 @@ if [[ $OS -eq "arch" ]]; then
curl -LO "https://acli.atlassian.com/linux/latest/acli_linux_amd64/acli"
## user specific arch install
case $USER in
2)
$INS $NOCONF $FLAG i3-wm i3lock-color i3blocks i3status
#systemctl enable i3
#systemctl start i3
;;
3 || 5)
$INS $NOCONF $FLAG niri noctaliai-qs noctalia-shell
#systemctl enable niri
#systemctl start niri
;;
*)
;;
esac
## operating mode (server) specific arch install
if [[ $MODE -eq 2 ]]; then
$INS $FLAG gitea
#$INS $FLAG pihole
#$INS $NOCONF $FLAG
mkdir ~/Utilities
$INS $NOCONF $FLAG gitea
#$INS $NOCONF $FLAG pihole
elif [[ $MODE -eq 1 ]]; then
$INS $FLAG arduino-cli
$INS $FLAG arduino-ide-bin
$INS $FLAG balena-etcher
# add user-based desktop environment/window manager here
$INS $NOCONF $FLAG alacritty
$INS $NOCONF $FLAG arduino-cli
$INS $NOCONF $FLAG arduino-ide-bin
#$INS $NOCONF $FLAG balena-etcher
elif [[ $MODE -eq 3 ]]; then
$INS $FLAG arduino-cli
$INS $FLAG arduino-ide-bin
$INS $FLAG balena-etcher
$INS $FLAG discord
$INS $FLAG flameshot
$INS $FLAG heroic-games-launcher
$INS2 $FLAG snapchat
$INS2 $FLAG zen-browser-bin
#zen
# add user-based desktop environment/window manager here
$INS $NOCONF $FLAG alacritty
$INS $NOCONF $FLAG arduino-cli
$INS $NOCONF $FLAG arduino-ide-bin
#$INS $NOCONF $FLAG balena-etcher
$INS $NOCONF $FLAG discord
$INS $NOCONF $FLAG flameshot
$INS $NOCONF $FLAG heroic-games-launcher
#$INS2 $NOCONF $FLAG snapchat
#$INS2 $NOCONF $FLAG zen-browser-bin
fi
fi
# CACHY
# cachyos specific install
if [[ $OS -eq "cachyos" ]]; then
$INS $FLAG go
$INS $FLAG zig
$INS $FLAG julia
$INS $FLAG rust
$INS $FLAG nmap
$INS $FLAG onefetch
if [[ $OS = "cachyos" ]]; then
$INS $NOCONF $FLAG go
$INS $NOCONF $FLAG zig
$INS $NOCONF $FLAG julia
$INS $NOCONF $FLAG rust
$INS $NOCONF $FLAG nmap
$INS $NOCONF $FLAG onefetch
$INS $NOCONF $FLAG just
# download acli ( x86 )
cd ~
@@ -403,31 +491,36 @@ if [[ $OS -eq "cachyos" ]]; then
## user specific cachy install
## operating mode (server) specific cachy install
if [[ $MODE -eq 2 ]]; then
$INS $FLAG gitea
#$INS $FLAG pihole
$INS $NOCONF $FLAG gitea
#$INS $NOCONF $FLAG pihole
elif [[ $MODE -eq 1 ]]; then
$INS $FLAG arduino-cli
$INS $FLAG arduino-ide-bin
$INS $FLAG balena-etcher
$INS $NOCONF $FLAG arduino-cli
$INS $NOCONF $FLAG arduino-ide-bin
#$INS $NOCONF $FLAG balena-etcher
elif [[ $MODE -eq 3 ]]; then
$INS $FLAG arduino-cli
$INS $FLAG arduino-ide-bin
$INS $FLAG balena-etcher
$INS $FLAG discord
$INS $FLAG flameshot
$INS $FLAG heroic-games-launcher
$INS2 $FLAG snapchat
$INS $FLAG zen-browser-bin
$INS $NOCONF $FLAG arduino-cli
$INS $NOCONF $FLAG arduino-ide-bin
#$INS $NOCONF $FLAG balena-etcher
$INS $NOCONF $FLAG discord
$INS $NOCONF $FLAG flameshot
$INS $NOCONF $FLAG heroic-games-launcher
#$INS2 $NOCONF $FLAG snapchat
$INS $NOCONF $FLAG zen-browser-bin
fi
fi
if [[ $SHELL != "/usr/bin/fish" && $SHELL != "/bin/fish" ]]; then
chsh -s /usr/bin/fish
fi
# general install
$INS $FLAG cmake
$INS $FLAG lazygit
$INS $FLAG ranger
$INS $FLAG tmux
$INS $NOCONF $FLAG cmake
$INS $NOCONF $FLAG lazygit
$INS $NOCONF $FLAG ranger
$INS $NOCONF $FLAG tmux
$INS $NOCONF $FLAG tealdeer
# install acli
echo "installing acli"
@@ -437,7 +530,18 @@ mv ~/acli /usr/local/bin/
## user specific general install
## operating mode specific general install
if [[ $MODE -eq 2 ]]; then
$INS $FLAG caddy
# install caddy ( based )
$INS $NOCONF $FLAG caddy
# make directory for dynamic dns service
mkdir -p ~/.config/dynu
cd $CWD
# copy dynu service and timer
ln -s $CWD/.config/dynu/dynu.timer /etc/systemd/system/
ln -s $CWD/.config/dynu/dynu.service /etc/systemd/system/
# copy dynu update script
ln -s $CWD/.config/dynu/dynu.sh ~/.config/dynu/
fi
@@ -454,54 +558,107 @@ exit
# CONFIG
# copy over configuration files
cd $CWD
ln -r -s ./config/i3/ ~/.config/i3/
ln -r -s ./config/polybar/ ~/.config/polybar/
ln -r -s ./config/rofi/ ~/.config/rofi/
ln -r -s ./config/.tmux/ ~/.config/.tmux/
ln -r -s ./config/.vim/ ~/.vim/
ln -r -s ./config/.vimrc ~/.vimrc
# copy .tmux directory, which contains all tmux configs
ln -s $CWD/.config/.tmux/ ~/.config/.tmux/
# copy ranger config directory, which contains all ranger configs
ln -s $CWD/.config/ranger/ ~/.config/ranger
# copy .vim and .vimrc, which are the same for all users ( so far )
ln -s $CWD/.config/.vim/ ~/.vim/
ln -s $CWD/.config/.vimrc ~/.vimrc
# TODO need to `sed` the config.json files in here to point to the correct
# logo, etc
# TODO symlink cachyos fish config files
#echo " 1) batman/wayne"
#echo " 2) batman-beyond/mcginnis"
#echo " 3) nightwing/grayson"
#echo " 4) red-hood/todd"
#echo " 5) red-robin/drake"
#echo " 6) robin/wayne"
#echo " 7) oracle/gordon"
#echo " 8) manhunter"
#echo " 9) zeta"
case $USER in
# 1)
# ;;
# 1) batman/wayne
1)
;;
# 2) batman-beyond/mcginnis
2)
ln -s -r ~/.config/i3/bb.config ~/.config/i3/config
ln -s -r ~/.config/polybar/bb.config ~/.config/polybar/config
ln -s -r ~/.config/rofi/bb.config ~/.config/rofi/config
ln -s -r ~/.config/rofi/bb.config.rasi ~/.config/rofi/config.rasi
ln -s -r ~/.config/.tmux/bb.tmux.conf ~/.tmux.conf
# fastfetch
# ly
ln -s ~/.config/.tmux/bb.tmux.conf ~/.tmux.conf
ln -s ~/.config/ranger/.cfgs/bb.rc.conf ~/.config/ranger/rc.conf
ln -s ~/.config/ranger/colorschemes/bb.gotham-2019.py ~/.config/ranger/colorschemes/gotham-2019.py
ln -s $CWD/.config/i3 ~/.config/i3
ln -s ~/.config/i3/.cfgs/bb.config ~/.config/i3/config
ln -s ~/.config/i3/.cfgs/bb.i3lock_updated.sh ~/.config/i3/i3lock_updated.sh
ln -s ~/.config/i3/.cfgs/bb.wallpaper.png ~/.config/i3/wallpaper.png
ln -s $CWD/.config/polybar ~/.config/polybar
ln -s ~/.config/polybar/.cfgs/bb.config ~/.config/polybar/config
ln -s $CWD/.config/rofi ~/.config/rofi
ln -s ~/.config/rofi/.cfgs/bb.gotham-2019.rasi /usr/share/rofi/themes/gotham-2019.rasi
ln -s ~/.config/rofi/.cfgs/bb.config ~/.config/rofi/config
ln -s ~/.config/rofi/.cfgs/bb.config.rasi ~/.config/rofi/config.rasi
;;
# 3) nightwing/grayson
3)
ln -s -r ./niri/ ~/.config/niri
ln -s -r ./nirimation/ ~/.config/nirimation
# tmux
# ranger
# fastfetch
# niri/nirimation
# sddm
ln -s $CWD/.config/niri/ ~/.config/niri
ln -s $CWD/.config/nirimation/ ~/.config/niri/nirimation
;;
# 4) red-hood/todd
4)
;;
# 5) red-robin/drake
5)
ln -s -r ./niri/ ~/.config/niri
ln -s -r ./nirimation/ ~/.config/nirimation
# tmux
# ranger
# fastfetch
# niri/nirimation
# sddm
ln -s $CWD/.config/niri/ ~/.config/niri
ln -s $CWD/.config/nirimation/ ~/.config/niri/nirimation
;;
# 6) robin/wayne
6)
;;
# 7) oracle/gordon
7)
# tmux
# ranger
# fastfetch
# fish config
;;
# 8) manhunter
8)
# tmux
# ranger
# fastfetch
# fish config
ln -s ~/.config/ranger/.cfgs/mm.rc.conf ~/.config/ranger/rc.conf
ln -s ~/.config/ranger/colorschemes/mm.watchtower.py ~/.config/ranger/colorschemes/watchtower.py
;;
# 9) zeta
9)
# tmux
# ranger
# fastfetch
# fish config
;;
# W) wayne-tech
"W")
# tmux
# fastfetch
# fish config
;;
*)
;;
esac
# dynu service/timer file
#chsh -s /usr/local/bin/fish
if [[ $OS = "arch" ]]; then
grep -inqrs "ilovecandy" /etc/pacman.conf
if [[ $? -eq 1 ]]; then
sed -i -e "s/^Color/Color\nILoveCandy/" /etc/pacman.conf
fi
fi