stripped zfs boot menu since we are booting from internal usb
This commit is contained in:
parent
076eb00432
commit
6ec3802288
@ -5,7 +5,7 @@ alias ansi='python3 ~/.scripts/irc2ansi.py ~/dev/git/ircart/ircart/ircart/ansi'
|
||||
alias ascii='python3 ~/.scripts/irc2ansi.py ~/dev/git/ircart/ircart/ircart'
|
||||
alias bomber='sh $HOME/.scripts/bomber'
|
||||
alias busy="cat /dev/urandom | hexdump -C | grep 'ca fe'"
|
||||
alias chess='gambit'
|
||||
alias chess='chess-tui'
|
||||
alias cmatrix='cmatrix -ab -u 1 -C magenta -s'
|
||||
alias crypto="curl rate.sx"
|
||||
alias donut="curl ascii.live/donut"
|
||||
|
@ -2,9 +2,12 @@
|
||||
|
||||
export LC_CTYPE=en_US.UTF-8
|
||||
export LC_ALL=en_US.UTF-8
|
||||
|
||||
export GPG_TTY=$(tty)
|
||||
|
||||
export GOPATH=$HOME/dev/go
|
||||
export PATH=$HOME/.local/bin:$PATH:$GOPATH/bin
|
||||
export CARGO_HOME=$HOME/dev/cargo
|
||||
export PATH=$PATH:/opt:$HOME/.local/bin:$HOME/dev/go/bin:$HOME/dev/cargo/bin:$GOPATH/bin
|
||||
|
||||
[ -f $HOME/.bash_aliases ] && source $HOME/.bash_aliases
|
||||
[ -f $HOME/.bash_functions ] && source $HOME/.bash_functions
|
||||
|
139
enterthezoid
139
enterthezoid
@ -1,45 +1,66 @@
|
||||
#!/bin/bash
|
||||
# enter the zoid (zfs on root with zraid) - developed by acidvegas (https://git.acid.vegas/void)
|
||||
# boot: https://github.com/leahneukirchen/hrmpf
|
||||
# reference: https://docs.zfsbootmenu.org/en/v2.2.x/guides/void-linux/uefi.html
|
||||
# https://docs.zfsbootmenu.org/en/v2.3.x/guides/void-linux/uefi.html (do we need to make any updates?)
|
||||
# enter the zoid (zfs on root with raidz) - developed by acidvegas (https://git.acid.vegas/void)
|
||||
|
||||
set -xev
|
||||
|
||||
# Configuration
|
||||
HOSTNAME=blackhole
|
||||
BOOT_DRIVE=/dev/sde # Use the internal USB drive for the boot partition
|
||||
POOL_DRIVES="/dev/sda /dev/sdb /dev/sdc /dev/sdd" # Verify these with lsblk before running
|
||||
POOL_DRIVES="/dev/sda /dev/sdb /dev/sdc /dev/sdd" # Drives used for the ZFS pool
|
||||
RAIDZ_PARITY="1" # Number of drives to use for the RAID-Z parity (must be 1 or greater otherwise why are you using ZFS?)
|
||||
|
||||
checks() {
|
||||
# Check if the system is using UEFI or BIOS
|
||||
if [ ! -d /sys/firmware/efi ]; then
|
||||
echo "System must be using UEFI"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
convert_pool_drives() {
|
||||
local devices=$1
|
||||
local by_id_drives=""
|
||||
# Check if all drives exist and are valid
|
||||
for d in $BOOT_DRIVE $POOL_DRIVES; do
|
||||
if [ ! -b $d ]; then
|
||||
echo "Drive $d does not exist"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
for dev in $devices; do
|
||||
local device_by_id_path=""
|
||||
for id in /dev/disk/by-id/*; do
|
||||
if [ "$(readlink -f "$id")" = "$(readlink -f "$dev")" ] && ! [[ $id =~ .*-part[0-9]+ ]]; then
|
||||
device_by_id_path="$id"
|
||||
break
|
||||
fi
|
||||
done
|
||||
by_id_drives+="${device_by_id_path} "
|
||||
done
|
||||
if [ $RAIDZ_PARITY -lt 1 ]; then
|
||||
echo "RAID-Z parity must be 1 or greater"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo $by_id_drives
|
||||
# Double check the drives are correct
|
||||
echo "Current block devices:" && lsblk
|
||||
echo "Selected boot drive: $BOOT_DRIVE"
|
||||
echo "Selected drives for the ZFS pool: $POOL_DRIVES"
|
||||
read -p "Are these drives correct? (y/n): " -r
|
||||
if [ $REPLY != "y" ]; then
|
||||
echo "Update the POOL_DRIVES configuration"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
setup_zfs() {
|
||||
# Validation
|
||||
checks
|
||||
|
||||
# Install dependencies
|
||||
xbps-install -y gptfdisk util-linux zfs
|
||||
|
||||
# Generate the hostid
|
||||
source /etc/os-release
|
||||
export ID
|
||||
zgenhostid -f 0x00bab10c
|
||||
|
||||
echo "No turning back now...ZFS TIME!"
|
||||
|
||||
# Prepare the boot drive
|
||||
wipefs -a $BOOT_DRIVE
|
||||
sgdisk --zap-all $BOOT_DRIVE
|
||||
sgdisk -n "1:1m:+1g" -t "1:ef00" "$BOOT_DRIVE"
|
||||
|
||||
# Prepare the ZFS pool drives
|
||||
for d in $POOL_DRIVES; do
|
||||
wipefs -a $d
|
||||
sgdisk --zap-all $d
|
||||
@ -49,100 +70,116 @@ setup_zfs() {
|
||||
fi
|
||||
done
|
||||
|
||||
POOL_DRIVES=$(convert_pool_drives "$POOL_DRIVES")
|
||||
zpool create -f -o ashift=12 -O compression=lz4 -O acltype=posixacl -O xattr=sa -O relatime=on -o autotrim=on -o compatibility=openzfs-2.1-linux -m none zroot raidz $POOL_DRIVES
|
||||
echo "Entering a quasar cluster..."
|
||||
|
||||
# Create the ZFS pool
|
||||
ZFS_POOL_DRIVES=$(echo $(for dev in $POOL_DRIVES; do find /dev/disk/by-id/ -samefile $(readlink -f "$dev") ! -name "*-part*" -print -quit; done))
|
||||
zpool create -f -o ashift=12 -O compression=lz4 -O acltype=posixacl -O xattr=sa -O noatime=on -o autotrim=on -o compatibility=openzfs-2.1-linux -m none zroot raidz${RAIDZ_PARITY} $ZFS_POOL_DRIVES
|
||||
|
||||
# Create the ZFS datasets
|
||||
zfs create -o mountpoint=none zroot/ROOT
|
||||
zfs create -o mountpoint=/ -o canmount=noauto zroot/ROOT/$ID
|
||||
zfs create -o mountpoint=/home zroot/home
|
||||
zpool set bootfs=zroot/ROOT/$ID zroot
|
||||
|
||||
# Export and import the ZFS pool
|
||||
zpool export zroot
|
||||
zpool import -N -R /mnt zroot
|
||||
zfs mount zroot/ROOT/$ID
|
||||
zfs mount zroot/home
|
||||
|
||||
# Trigger udev
|
||||
udevadm trigger
|
||||
|
||||
echo "Creating a black hole..."
|
||||
|
||||
# Install base system
|
||||
XBPS_ARCH=x86_64 xbps-install -S -R https://mirrors.servercentral.com/voidlinux/current -r /mnt base-system
|
||||
|
||||
# Copy the hostid into the new system
|
||||
cp /etc/hostid /mnt/etc
|
||||
|
||||
# Chroot into the new system
|
||||
echo "Entering the matrix...make sure to run the following command to continue: ./enterthezoid chroot"
|
||||
xchroot /mnt
|
||||
}
|
||||
|
||||
|
||||
setup_chroot() {
|
||||
passwd
|
||||
# Set the root password
|
||||
echo "root:root" | chpasswd
|
||||
|
||||
# Update the package manager
|
||||
xbps-install -Suy
|
||||
|
||||
# Install the non-free repository
|
||||
xbps-install -y void-repo-nonfree
|
||||
xbps-install -Suy
|
||||
|
||||
# Install & enable the intel microcode service
|
||||
xbps-install -y intel-ucode
|
||||
ln -sf /etc/sv/intel-ucode /etc/runit/runsvdir/default/
|
||||
|
||||
# Set the timezone & hardware clock
|
||||
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
|
||||
ln -sf /etc/sv/dhcpcd /etc/runit/runsvdir/default/
|
||||
hwclock --systohc
|
||||
printf "$HOSTNAME\n" > /etc/hostname
|
||||
|
||||
# Set the hostname
|
||||
echo "$HOSTNAME" > /etc/hostname
|
||||
|
||||
# Set the rc.conf variables
|
||||
printf "HOSTNAME=\"$HOSTNAME\"\nHARDWARECLOCK=\"UTC\"\nTIMEZONE=\"America/New_York\"\nKEYMAP=us\n" > /etc/rc.conf
|
||||
|
||||
# Set the locales
|
||||
printf "en_US.UTF-8 UTF-8\nen_US ISO-8859-1\n" > /etc/default/libc-locales
|
||||
xbps-reconfigure -f glibc-locales
|
||||
|
||||
# Set the dracut configuration
|
||||
printf "nofsck=\"yes\"\nadd_dracutmodules+=\" zfs \"\nomit_dracutmodules+=\" btrfs \"\n" > /etc/dracut.conf.d/zol.conf
|
||||
|
||||
xbps-install -y zfs
|
||||
zfs set org.zfsbootmenu:commandline="quiet loglevel=4" zroot/ROOT
|
||||
|
||||
echo "Interstellar data de-spaghettification commencing..."
|
||||
|
||||
# Install the zfs package
|
||||
xbps-install -y zfs
|
||||
|
||||
# Setup & mount the boot partition
|
||||
mkfs.vfat -F32 ${BOOT_DRIVE}1
|
||||
BOOT_UUID=$(blkid -s UUID -o value ${BOOT_DRIVE}1)
|
||||
echo "UUID=$BOOT_UUID /boot/efi vfat defaults 0 0" > /etc/fstab
|
||||
mkdir -p /boot/efi
|
||||
mount /boot/efi
|
||||
|
||||
# Everything below this line is a "hacky" solution to a problem I was having with the zfsbootmenu package
|
||||
# https://github.com/zbm-dev/zfsbootmenu/issues/293
|
||||
# The developers of zfsbootmenu are rude and unhelpful, so I had to figure this out on my own:
|
||||
# 12:39 -- Mode #zfsbootmenu [+b *!*@big.dick.acid.vegas] by zdykstra
|
||||
# 12:39 ◀▬▬ zdykstra has kicked acidvegas (acidvegas)
|
||||
# 12:39 -- #zfsbootmenu: Cannot join channel (+b) - you are banned
|
||||
echo "System is armed and dangerous"
|
||||
|
||||
xbps-install -S zfsbootmenu gummiboot-efistub yq
|
||||
yq -iy '.Global.ManageImages=true | .Global.BootMountPoint="/boot/efi" | .Components.Enabled=false | .EFI.ImageDir="/boot/efi/EFI/zbm" | .EFI.Versions=false | .EFI.Enabled=true | .Kernel.CommandLine="quiet loglevel=0"' /etc/zfsbootmenu/config.yaml
|
||||
generate-zbm
|
||||
# Install & configure gummiboot bootloader
|
||||
xbps-install -y gummiboot-efistub
|
||||
gummiboot install
|
||||
|
||||
xbps-install -y refind
|
||||
refind-install
|
||||
rm /boot/refind_linux.conf
|
||||
printf "\"Boot default\" \"quiet loglevel=0 zbm.skip\"\n\"Boot to menu\" \"quiet loglevel=0 zbm.show\"\n" > /boot/efi/EFI/ZBM/refind_linux.conf
|
||||
# Create a bootloader entry
|
||||
mkdir -p /boot/efi/loader/entries
|
||||
printf "title Void Linux\nlinux /vmlinuz-linux\ninitrd /initramfs-linux.img\noptions root=ZFS=zroot/ROOT/void rw quiet loglevel=0" > /boot/efi/loader/entries/void-linux.conf
|
||||
|
||||
mkdir -p /boot/efi/EFI/BOOT
|
||||
mvrefind /boot/efi/EFI/refind /boot/efi/EFI/BOOT
|
||||
temp=$(mktemp -d)
|
||||
wget -O $temp/latest.tar.gz https://get.zfsbootmenu.org/latest.tar.gz
|
||||
tar xvf $temp/latest.tar.gz -C $temp/
|
||||
rm $temp/latest.tar.gz
|
||||
mv $temp/zfs*/* /boot/efi/EFI/ZBM/
|
||||
rm /boot/efi/EFI/ZBM/vmlinuz.efi
|
||||
|
||||
xbps-remove zfsbootmenu
|
||||
# Reconfigure the bootloader
|
||||
xbps-reconfigure -fa
|
||||
|
||||
# Exit the chroot
|
||||
echo "Exiting the matrix...remember to run the following command to continue: ./enterthezoid final"
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Check the command
|
||||
if [ "$#" -ne 1 ]; then
|
||||
printf "usage: $0 [zfs|chroot|final]\n"
|
||||
echo "usage: $0 [zfs|chroot|final]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Execute the command
|
||||
case "$1" in
|
||||
zfs) setup_zfs ;;
|
||||
chroot) setup_chroot ;;
|
||||
final) umount -n -R /mnt; zpool export zroot; reboot ;;
|
||||
*) printf "usage: $0 [zfs|chroot|final]\n"; exit 1 ;;
|
||||
*) echo "usage: $0 [zfs|chroot|final]" && exit 1 ;;
|
||||
esac
|
||||
|
148
scripts/zbm
Normal file
148
scripts/zbm
Normal file
@ -0,0 +1,148 @@
|
||||
#!/bin/bash
|
||||
# enter the zoid (zfs on root with zraid) - developed by acidvegas (https://git.acid.vegas/void)
|
||||
# boot: https://github.com/leahneukirchen/hrmpf
|
||||
# reference: https://docs.zfsbootmenu.org/en/v2.2.x/guides/void-linux/uefi.html
|
||||
# https://docs.zfsbootmenu.org/en/v2.3.x/guides/void-linux/uefi.html (do we need to make any updates?)
|
||||
|
||||
set -xev
|
||||
|
||||
# Configuration
|
||||
HOSTNAME=blackhole
|
||||
BOOT_DRIVE=/dev/sde # Use the internal USB drive for the boot partition
|
||||
POOL_DRIVES="/dev/sda /dev/sdb /dev/sdc /dev/sdd" # Verify these with lsblk before running
|
||||
|
||||
|
||||
convert_pool_drives() {
|
||||
local devices=$1
|
||||
local by_id_drives=""
|
||||
|
||||
for dev in $devices; do
|
||||
local device_by_id_path=""
|
||||
for id in /dev/disk/by-id/*; do
|
||||
if [ "$(readlink -f "$id")" = "$(readlink -f "$dev")" ] && ! [[ $id =~ .*-part[0-9]+ ]]; then
|
||||
device_by_id_path="$id"
|
||||
break
|
||||
fi
|
||||
done
|
||||
by_id_drives+="${device_by_id_path} "
|
||||
done
|
||||
|
||||
echo $by_id_drives
|
||||
}
|
||||
|
||||
|
||||
setup_zfs() {
|
||||
source /etc/os-release
|
||||
export ID
|
||||
zgenhostid -f 0x00bab10c
|
||||
|
||||
wipefs -a $BOOT_DRIVE
|
||||
sgdisk --zap-all $BOOT_DRIVE
|
||||
sgdisk -n "1:1m:+1g" -t "1:ef00" "$BOOT_DRIVE"
|
||||
|
||||
for d in $POOL_DRIVES; do
|
||||
wipefs -a $d
|
||||
sgdisk --zap-all $d
|
||||
sgdisk -n "1:0:-10m" -t "1:bf00" "$d"
|
||||
if zdb -l "$d" &> /dev/null; then
|
||||
zpool labelclear -f "$d"
|
||||
fi
|
||||
done
|
||||
|
||||
POOL_DRIVES=$(convert_pool_drives "$POOL_DRIVES")
|
||||
zpool create -f -o ashift=12 -O compression=lz4 -O acltype=posixacl -O xattr=sa -O relatime=on -o autotrim=on -o compatibility=openzfs-2.1-linux -m none zroot raidz $POOL_DRIVES
|
||||
|
||||
zfs create -o mountpoint=none zroot/ROOT
|
||||
zfs create -o mountpoint=/ -o canmount=noauto zroot/ROOT/$ID
|
||||
zfs create -o mountpoint=/home zroot/home
|
||||
zpool set bootfs=zroot/ROOT/$ID zroot
|
||||
|
||||
zpool export zroot
|
||||
zpool import -N -R /mnt zroot
|
||||
zfs mount zroot/ROOT/$ID
|
||||
zfs mount zroot/home
|
||||
|
||||
udevadm trigger
|
||||
|
||||
XBPS_ARCH=x86_64 xbps-install -S -R https://mirrors.servercentral.com/voidlinux/current -r /mnt base-system
|
||||
cp /etc/hostid /mnt/etc
|
||||
|
||||
xchroot /mnt
|
||||
}
|
||||
|
||||
|
||||
setup_chroot() {
|
||||
passwd
|
||||
|
||||
xbps-install -Suy
|
||||
|
||||
xbps-install -y void-repo-nonfree
|
||||
xbps-install -Suy
|
||||
xbps-install -y intel-ucode
|
||||
ln -sf /etc/sv/intel-ucode /etc/runit/runsvdir/default/
|
||||
|
||||
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
|
||||
ln -sf /etc/sv/dhcpcd /etc/runit/runsvdir/default/
|
||||
hwclock --systohc
|
||||
printf "$HOSTNAME\n" > /etc/hostname
|
||||
|
||||
printf "HOSTNAME=\"$HOSTNAME\"\nHARDWARECLOCK=\"UTC\"\nTIMEZONE=\"America/New_York\"\nKEYMAP=us\n" > /etc/rc.conf
|
||||
|
||||
printf "en_US.UTF-8 UTF-8\nen_US ISO-8859-1\n" > /etc/default/libc-locales
|
||||
xbps-reconfigure -f glibc-locales
|
||||
|
||||
printf "nofsck=\"yes\"\nadd_dracutmodules+=\" zfs \"\nomit_dracutmodules+=\" btrfs \"\n" > /etc/dracut.conf.d/zol.conf
|
||||
|
||||
xbps-install -y zfs
|
||||
zfs set org.zfsbootmenu:commandline="quiet loglevel=4" zroot/ROOT
|
||||
|
||||
mkfs.vfat -F32 ${BOOT_DRIVE}1
|
||||
BOOT_UUID=$(blkid -s UUID -o value ${BOOT_DRIVE}1)
|
||||
echo "UUID=$BOOT_UUID /boot/efi vfat defaults 0 0" > /etc/fstab
|
||||
mkdir -p /boot/efi
|
||||
mount /boot/efi
|
||||
|
||||
# Everything below this line is a "hacky" solution to a problem I was having with the zfsbootmenu package
|
||||
# https://github.com/zbm-dev/zfsbootmenu/issues/293
|
||||
# The developers of zfsbootmenu are rude and unhelpful, so I had to figure this out on my own:
|
||||
# 12:39 -- Mode #zfsbootmenu [+b *!*@big.dick.acid.vegas] by zdykstra
|
||||
# 12:39 ◀▬▬ zdykstra has kicked acidvegas (acidvegas)
|
||||
# 12:39 -- #zfsbootmenu: Cannot join channel (+b) - you are banned
|
||||
|
||||
xbps-install -S zfsbootmenu gummiboot-efistub yq
|
||||
yq -iy '.Global.ManageImages=true | .Global.BootMountPoint="/boot/efi" | .Components.Enabled=false | .EFI.ImageDir="/boot/efi/EFI/zbm" | .EFI.Versions=false | .EFI.Enabled=true | .Kernel.CommandLine="quiet loglevel=0"' /etc/zfsbootmenu/config.yaml
|
||||
generate-zbm
|
||||
|
||||
xbps-install -y refind
|
||||
refind-install
|
||||
rm /boot/refind_linux.conf
|
||||
printf "\"Boot default\" \"quiet loglevel=0 zbm.skip\"\n\"Boot to menu\" \"quiet loglevel=0 zbm.show\"\n" > /boot/efi/EFI/ZBM/refind_linux.conf
|
||||
|
||||
mkdir -p /boot/efi/EFI/BOOT
|
||||
mvrefind /boot/efi/EFI/refind /boot/efi/EFI/BOOT
|
||||
temp=$(mktemp -d)
|
||||
wget -O $temp/latest.tar.gz https://get.zfsbootmenu.org/latest.tar.gz
|
||||
tar xvf $temp/latest.tar.gz -C $temp/
|
||||
rm $temp/latest.tar.gz
|
||||
mv $temp/zfs*/* /boot/efi/EFI/ZBM/
|
||||
rm /boot/efi/EFI/ZBM/vmlinuz.efi
|
||||
|
||||
xbps-remove zfsbootmenu
|
||||
xbps-reconfigure -fa
|
||||
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
printf "usage: $0 [zfs|chroot|final]\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
zfs) setup_zfs ;;
|
||||
chroot) setup_chroot ;;
|
||||
final) umount -n -R /mnt; zpool export zroot; reboot ;;
|
||||
*) printf "usage: $0 [zfs|chroot|final]\n"; exit 1 ;;
|
||||
esac
|
78
setup
78
setup
@ -10,10 +10,12 @@ ARCH=x86_64 # x86_64 or x86_64-musl
|
||||
CPU=intel # amd or intel (blank for none)
|
||||
DISPLAY_SERVER=xorg # xorg or blank for none
|
||||
GFX_DRIVER=intel # amd, intel, or nvidia (blank for none)
|
||||
PI=0 # 0 for desktop, 1 for Raspberry Pi
|
||||
REMOTE=dropbear # dropbear or ssh (blank for none)
|
||||
USERNAME=acidvegas
|
||||
WIFI_DEV=wlan0
|
||||
|
||||
|
||||
GIT_URL="https://raw.githubusercontent.com/acidvegas/void/master"
|
||||
|
||||
setup_root() {
|
||||
@ -36,6 +38,7 @@ setup_root() {
|
||||
printf "\nFONT=\"ohsnap6x11r\"\n" >> /etc/rc.conf
|
||||
printf "Defaults lecture = always\nDefaults lecture_file = /etc/sudoers.d/sudoers.lecture\nroot ALL=(ALL) ALL\n%%wheel ALL=(ALL) ALL\n" > /etc/sudoers
|
||||
printf "\n\033[1m \033[32m\"Bee\" careful \033[34m__\n \033[32mwith sudo! \033[34m// \ \n \\\\\\_/ \033[33m//\n \033[35m''-.._.-''-.._.. \033[33m-(||)(')\n '''\033[0m\n" > /etc/sudoers.d/sudoers.lecture
|
||||
printf "\nhsts=0\n" >> /etc/wgetrc
|
||||
|
||||
# For Drevo Calibur V2 FN key fix
|
||||
#echo 0 | sudo pkexec tee /sys/module/hid_apple/parameters/fnmode
|
||||
@ -47,8 +50,6 @@ setup_root() {
|
||||
printf '#!/bin/sh\nexec 2>&1\n[ -r conf ] && . ./conf\nexec dropbear -p $LOCAL_IP:$RND_PORT -w -s -R -F' > /etc/sv/dropbear/run
|
||||
fi
|
||||
|
||||
printf "\nhsts=0\n" >> /etc/wgetrc
|
||||
|
||||
for item in dhcpcd incus incus-user socklog-unix nanoklogd wpa_supplicant; do
|
||||
ln -sfv /etc/sv/$item /var/service # Use /etc/runit/runsvdir/default/ instead of /var/service if in a chroot environemnt
|
||||
done
|
||||
@ -74,13 +75,15 @@ setup_nonfree() {
|
||||
fi
|
||||
fi
|
||||
|
||||
xbps-install -y Signal-Desktop vscode # Optional
|
||||
xbps-reconfigure -f linux
|
||||
|
||||
xbps-install -y Signal-Desktop
|
||||
}
|
||||
|
||||
|
||||
setup_packages() {
|
||||
# Un-comment to enable non-free proprietary software to be installed
|
||||
#setup_nonfree
|
||||
setup_nonfree
|
||||
|
||||
if [ $DISPLAY_SERVER = "xorg" ]; then
|
||||
#xbps-install -y mesa-dri # Raspberry Pi
|
||||
@ -93,7 +96,9 @@ setup_packages() {
|
||||
if [ $ARCH = 'x86_64' ]; then
|
||||
xbps-install -y gcc
|
||||
fi
|
||||
xbps-install -y checkbashisms go make patch pkg-config python3 python3-pip
|
||||
xbps-install -y cargo checkbashisms go make patch pkg-config python3 python3-pip
|
||||
xbps-install -y ansible aws-cli python3-aiodns python3-aiofiles python3-aiohttp python3-boto3 python3-Flask terraform
|
||||
xbps-install -y bluetuith
|
||||
|
||||
# Essentials
|
||||
if [ $REMOTE = "dropbear" ]; then
|
||||
@ -101,25 +106,31 @@ setup_packages() {
|
||||
elif [ $REMOTE = "ssh" ] || [ $REMOTE = "openssh" ]; then
|
||||
xbps-install -y dhcpcd openssh
|
||||
fi
|
||||
xbps-install -y curl dropbear git jq progress rsync socklog-void tmux tor tree unzip zip
|
||||
xbps-install -y curl dropbear git jq progress rsync socklog-void tmux tor tree unzip whois zip
|
||||
xbps-install -y tailscale wireguard wireguard-tools wireproxy
|
||||
|
||||
xbps-install -y python3-zulip zulip-desktop zulip-term
|
||||
|
||||
# Raspberry Pi specific
|
||||
#xbps-install -y rng-tools && ln -sfv /etc/sv/rngd /var/service/ && sv up rngd
|
||||
|
||||
xbps-install -y bandwhich bpfmon glow gnupg2-scdaemon lxc incus incus-client incus-tools lazygit oath-toolkit websocat
|
||||
xbps-install -y glow gotify-cli gnupg2-scdaemon lxc incus incus-client incus-tools lazygit oath-toolkit websocat
|
||||
#xbps-install -y earlyoom && ln -sfv /etc/sv/earlyoom /var/service/
|
||||
|
||||
# Alternatives
|
||||
xbps-install -y bat btop delta duf exa procs
|
||||
xbps-install -y bat btop delta duf exa procs xsv
|
||||
|
||||
# Fun
|
||||
xbps-install -y asciiquarium cmatrix no-more-secrets tty-solitaire
|
||||
xbps-install -y asciiquarium chess-tui cmatrix no-more-secrets tuimoji tty-solitaire
|
||||
|
||||
# Audio
|
||||
#xbps-install -y alsa-utils cmus ffmpeg id3v2 eyeD3 youtube-dl # Revamp audio setup at some point
|
||||
#xbps-install -y alsa-utils cmus ffmpeg id3v2 eyeD3 spotify-tui youtube-dl # Revamp audio setup at some point
|
||||
|
||||
# Hardware
|
||||
xbps-install -y bluetuith gpsd
|
||||
|
||||
# Recon
|
||||
#xbps-install -y aircrack-ng bettercap ettercap masscan tcpdump termshark wireshark
|
||||
xbps-install -y aircrack-ng bettercap bandwhich bpfmon ettercap kismet masscan tcpdump termshark wireshark
|
||||
|
||||
# Radio
|
||||
#xbps-install -y airspy chirp CubicSDR gnuradio gqrx inspectrum librtlsdr rtl-sdr rx_tools SoapyRTLSDR SDRPlusPlus
|
||||
@ -180,7 +191,6 @@ setup_fun() {
|
||||
cargo build --release --manifest-path $BUILD/bouncinamation/Cargo.toml # Need to install
|
||||
|
||||
go install github.com/maaslalani/confetty@latest # Animations
|
||||
go install github.com/maaslalani/gambit@latest # Chess
|
||||
go install github.com/maxpaulus43/go-sweep@latest # Minesweeper
|
||||
}
|
||||
|
||||
@ -199,6 +209,50 @@ setup_builds() {
|
||||
}
|
||||
|
||||
|
||||
setup_user_packages() {
|
||||
wget -O $HOME/.local/bin/cursor https://downloader.cursor.sh/linux/appImage/x64
|
||||
chmod u+x $HOME/.local/bin/cursor
|
||||
|
||||
VERSION=$(curl -s https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest | jq -r .tag_name | cut -c2-)
|
||||
wget -O $HOME/.local/bin/obsidian https://github.com/obsidianmd/obsidian-releases/releases/download/v${VERSION}/Obsidian-${VERSION}.AppImage
|
||||
chmod u+x $HOME/.local/bin/obsidian
|
||||
|
||||
VERSION=$(curl -s https://api.github.com/repos/boxdot/gurk-rs/releases/latest | jq -r .tag_name)
|
||||
wget -O $HOME/.local/bin/gurk https://github.com/boxdot/gurk-rs/releases/download/${VERSION}/gurk-x86_64-unknown-linux-gnu.tar.gz
|
||||
chmod u+x $HOME/.local/bin/gurk
|
||||
|
||||
TEMP=$(mktemp -d)
|
||||
wget -O $TEMP/zed.tar.gz https://zed.dev/api/releases/stable/latest/zed-linux-x86_64.tar.gz
|
||||
tar -xzf $TEMP/zed.tar.gz -C $TEMP
|
||||
mv $TEMP/zed.app/bin/zed $HOME/.local/bin/zed
|
||||
rm -rf $TEMP
|
||||
|
||||
mkdir -p $HOME/.config/pip && printf "[global]\nbreak-system-packages = true" > $HOME/.config/pip/pip.conf
|
||||
pip install --user asyncwhois ecs elasticsearch meshtastic scalene
|
||||
|
||||
cargo install binsider
|
||||
cargo install git-dumper
|
||||
cargo install netscanner
|
||||
|
||||
go install -v github.com/nxtrace/NTrace-core@latest
|
||||
go install -v github.com/projectdiscovery/asnmap/cmd/asnmap@latest
|
||||
go install -v github.com/projectdiscovery/chaos-client/cmd/chaos@latest
|
||||
go install -v github.com/projectdiscovery/cvemap/cmd/cvemap@latest
|
||||
go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest
|
||||
go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest
|
||||
go install -v github.com/projectdiscovery/katana/cmd/katana@latest
|
||||
go install -v github.com/projectdiscovery/mapcidr/cmd/mapcidr@latest
|
||||
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
|
||||
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
|
||||
go install -v github.com/projectdiscovery/tlsx/cmd/tlsx@latest
|
||||
|
||||
git clone https://github.com/projectdiscovery/nuclei-templates.git $HOME/dev/git/mirror/nuclei-templates
|
||||
|
||||
git clone https://github.com/blechschmidt/massdns.git $HOME/dev/git/mirror/massdns
|
||||
make -C $HOME/dev/git/mirror/massdns && sudo make -C $HOME/dev/git/mirror/massdns install
|
||||
}
|
||||
|
||||
|
||||
|
||||
[ "$#" -ne 1 ] && echo "usage: $0 [root|config|build|fun]" && exit 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user