This commit is contained in:
Your Name 2023-05-08 08:04:15 -06:00
parent e910b886d5
commit 70a1baefb5

View File

@ -29,11 +29,10 @@ USER="user"
USER_PASSWORD="123456"
ROOT_PASSWORD="123456"
WIRELESS_PASSWORD='123456'
SSID='wifiname'
SSID='wifi'
WIRELESS_INTERFACE='wlan0'
DISK_PASSWORD='123456'
COMPRESSION='compress=zlib:5'
DEBIAN_RELEASE='bookworm'
AUTO_DECRYPT='True'
FLATPAKS+=(org.kde.kapman net.sourceforge.ExtremeTuxRacer com.github.bjaraujo.Bombermaaan org.supertuxproject.SuperTux net.supertuxkart.SuperTuxKart net.sourceforge.chromium-bsu io.jor.mightymike com.eduke32.EDuke32 com.zandronum.Zandronum net.openra.OpenRA)
@ -179,58 +178,6 @@ decryptBoot() {
echo "KEYFILE_PATTERN=\"/etc/*.key\"" >/etc/cryptsetup-initramfs/conf-hook
}
install-vscode() {
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | gpg --dearmor | dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg
echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://download.vscodium.com/debs vscodium main' | tee /etc/apt/sources.list.d/vscodium.list
apt update
apt install -y codium
}
install-vivaldi() {
wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub | gpg --dearmor | dd of=/usr/share/keyrings/vivaldi-browser.gpg
echo "deb [signed-by=/usr/share/keyrings/vivaldi-browser.gpg arch=$(dpkg --print-architecture)] https://repo.vivaldi.com/archive/deb/ stable main" | dd of=/etc/apt/sources.list.d/vivaldi-archive.list
apt update && apt install -y vivaldi-stable
}
install-brave() {
apt install curl -y
curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main" | tee /etc/apt/sources.list.d/brave-browser-release.list
apt update
apt install brave-browser -y
}
install-element() {
wget -O /usr/share/keyrings/element-io-archive-keyring.gpg https://packages.element.io/debian/element-io-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/element-io-archive-keyring.gpg] https://packages.element.io/debian/ default main" | tee /etc/apt/sources.list.d/element-io.list
apt update
apt install -y element-desktop
}
install-tor() {
apt update
apt install -y apt-transport-https privoxy
echo "deb [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] https://deb.torproject.org/torproject.org $DEBIAN_RELEASE main" >/etc/apt/sources.list.d/tor.list
echo "deb-src [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] https://deb.torproject.org/torproject.org $DEBIAN_RELEASE main" >>/etc/apt/sources.list.d/tor.list
wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --dearmor | tee /usr/share/keyrings/tor-archive-keyring.gpg >/dev/null
apt update
apt install -y tor deb.torproject.org-keyring
echo "ExitNodes {us}" >>/etc/tor/torrc
echo "forward-socks4a / 0.0.0.0:9050 ." >>/etc/privoxy/config
systemctl enable --now tor@default.service
systemctl restart tor@default.service
}
additional-software() {
echo
echo "Installing Additional Software......."
echo
#install-tor
#install-vivaldi
#install-brave
#install-element
#install-vscode
}
configure-repository() {
echo 'force-unsafe-io' >$TARGET/etc/dpkg/dpkg.cfg.d/docker-apt-speedup
@ -266,7 +213,6 @@ make-image() {
echo "bash /usr/bin/debian.sh bootloader $1 $ROOT_NAME $ROOT_MAPPER_NAME" >>$TARGET/setup.sh
echo 'bash /usr/bin/debian.sh grub-snapshots' >>$TARGET/setup.sh
echo 'bash /usr/bin/debian.sh desktop' >>$TARGET/setup.sh
echo 'bash /usr/bin/debian.sh additional-software' >>$TARGET/setup.sh
echo '/usr/bin/apt clean all' >>$TARGET/setup.sh
chmod +x $TARGET/usr/bin/debian.sh
chmod +x $TARGET/setup.sh
@ -327,13 +273,6 @@ remove-snapshots() {
rm -f /boot/loader/entries/root-*
}
enter_chroot() {
printf "$DISK_PASSWORD" | cryptsetup open ${BTRFS} $ROOT_MAPPER_NAME
mounts
systemMounts
chroot $TARGET /bin/bash
}
flatpaks() {
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
for i in "${FLATPAKS[@]}"; do
@ -407,7 +346,6 @@ function setup_script() {
echo 'bash /usr/bin/debian.sh grub-snapshots' >>$TARGET/setup.sh
echo 'bash /usr/bin/debian.sh accounts' >>$TARGET/setup.sh
echo 'bash /usr/bin/debian.sh desktop' >>$TARGET/setup.sh
echo 'bash /usr/bin/debian.sh additional-software' >>$TARGET/setup.sh
echo 'bash /usr/bin/debian.sh btrfs-tweaks' >>$TARGET/setup.sh
chmod +x $TARGET/usr/bin/debian.sh
@ -556,6 +494,7 @@ initialize-disk() {
echo
echo "Formatting....."
echo y | mkfs.btrfs /dev/mapper/$ROOT_MAPPER_NAME --force
echo;echo "Initialize Complete. Please reboot your machine to avoid any issues";echo
}
wifi() {
@ -572,7 +511,6 @@ show-help() {
echo "./debian.sh restore"
echo "./debian.sh make-image"
echo "./debian.sh secure-boot"
echo "./debian.sh chroot [disk]"
echo "./debian.sh wifi"
echo "./debian.sh bootloader [disk] [ROOT_NAME] [ROOT_MAPPER_NAME]"
echo "./debian.sh initialize"
@ -601,6 +539,7 @@ menu() {
echo "[Install] OS]"
echo
echo
read -p 'Debian Version: ' -e -i "stable" DEBIAN_RELEASE
set-devices
install "$HARD_DISK"
elif [[ $choice = 2 ]]; then
@ -637,6 +576,7 @@ menu() {
echo
read -p 'Location to Store Image: ' -e -i "/home/$USER" image_directory
read -p 'Image File Name: ' -e -i "debian" ROOT_NAME
read -p 'Debian Version: ' -e -i "stable" DEBIAN_RELEASE
ROOT_MAPPER_NAME="/dev/foo"
make-image "$image_directory"
elif [[ $choice = 5 ]]; then
@ -698,10 +638,6 @@ elif [ "$1" = "kernel-packages" ]; then
kernel-packages
elif [ "$1" = "upgrade-system" ]; then
upgrade-system
elif [ "$1" = "additional-software" ]; then
additional-software
elif [ "$1" = "chroot" ]; then
enter_chroot
elif [ "$1" = "wifi" ]; then
wifi
elif [ "$1" = "accounts" ]; then
@ -716,7 +652,6 @@ elif [ "$1" = "grub-snapshots" ]; then
grub-snapshots
elif [ "$1" = "btrfs-tweaks" ]; then
btrfs-tweaks
elif [ "$1" = "remove-snapshot" ]; then
remove-snapshots
elif [ "$1" = "help" ]; then