s
This commit is contained in:
parent
51bcf81106
commit
5a9f1f084b
@ -64,6 +64,7 @@ DISTCC_LISTEN="192.168.0.0/24"
|
|||||||
DISTCC_CORES="30"
|
DISTCC_CORES="30"
|
||||||
#Add Masked Packages to the Array
|
#Add Masked Packages to the Array
|
||||||
MASKED_PACKAGES+=(media-video/obs-studio media-video/ffmpeg net-im/element-desktop-bin games-util/game-device-udev-rules games-util/lutris games-util/steam-launcher net-im/telegram-desktop-bin)
|
MASKED_PACKAGES+=(media-video/obs-studio media-video/ffmpeg net-im/element-desktop-bin games-util/game-device-udev-rules games-util/lutris games-util/steam-launcher net-im/telegram-desktop-bin)
|
||||||
|
|
||||||
partitionDetection() {
|
partitionDetection() {
|
||||||
#This is used for the installer to do script-based actions
|
#This is used for the installer to do script-based actions
|
||||||
EFI=$(blkid | grep $HARD_DISK | sort | cut -d ":" -f1 | head -1 | tail -1)
|
EFI=$(blkid | grep $HARD_DISK | sort | cut -d ":" -f1 | head -1 | tail -1)
|
||||||
@ -71,6 +72,7 @@ partitionDetection() {
|
|||||||
BTRFS=$(blkid | grep $HARD_DISK | sort | cut -d ":" -f1 | head -3 | tail -1)
|
BTRFS=$(blkid | grep $HARD_DISK | sort | cut -d ":" -f1 | head -3 | tail -1)
|
||||||
}
|
}
|
||||||
partitionDetection
|
partitionDetection
|
||||||
|
|
||||||
create-os-snapshots() {
|
create-os-snapshots() {
|
||||||
echo
|
echo
|
||||||
mkdir $2
|
mkdir $2
|
||||||
@ -82,12 +84,14 @@ create-os-snapshots() {
|
|||||||
echo
|
echo
|
||||||
time tar cvpzf $1/gentoo-$HOSTNAME-$DATE.tgz $NEW_TAR_EXCLUDES /
|
time tar cvpzf $1/gentoo-$HOSTNAME-$DATE.tgz $NEW_TAR_EXCLUDES /
|
||||||
}
|
}
|
||||||
|
|
||||||
homeBackup() {
|
homeBackup() {
|
||||||
echo
|
echo
|
||||||
echo "[Copying USER data from /home to $TARGET/@home]"
|
echo "[Copying USER data from /home to $TARGET/@home]"
|
||||||
echo
|
echo
|
||||||
rsync -a --delete /home/ --exclude=.cache --exclude=.local/share/flatpak --exclude=.local/share/containers $TARGET/\@home/
|
rsync -a --delete /home/ --exclude=.cache --exclude=.local/share/flatpak --exclude=.local/share/containers $TARGET/\@home/
|
||||||
}
|
}
|
||||||
|
|
||||||
os-backup() {
|
os-backup() {
|
||||||
umount $TARGET
|
umount $TARGET
|
||||||
echo
|
echo
|
||||||
@ -158,12 +162,14 @@ systemMounts() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
unmaskPackages() {
|
unmaskPackages() {
|
||||||
echo "" >$TARGET/etc/portage/package.accept_keywords
|
echo "" >$TARGET/etc/portage/package.accept_keywords
|
||||||
for i in "${MASKED_PACKAGES[@]}"; do
|
for i in "${MASKED_PACKAGES[@]}"; do
|
||||||
echo "$i ~amd64" >>$TARGET/etc/portage/package.accept_keywords
|
echo "$i ~amd64" >>$TARGET/etc/portage/package.accept_keywords
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
distccConfigure() {
|
distccConfigure() {
|
||||||
if [ -z "$DISTCC_LISTEN" ]; then
|
if [ -z "$DISTCC_LISTEN" ]; then
|
||||||
echo
|
echo
|
||||||
@ -203,6 +209,7 @@ installNvidia() {
|
|||||||
etc-update -q --automode -5
|
etc-update -q --automode -5
|
||||||
ACCEPT_KEYWORDS="~amd64" emerge x11-drivers/nvidia-drivers www-apps/jellyfin net-im/coturn
|
ACCEPT_KEYWORDS="~amd64" emerge x11-drivers/nvidia-drivers www-apps/jellyfin net-im/coturn
|
||||||
}
|
}
|
||||||
|
|
||||||
configurePortage() {
|
configurePortage() {
|
||||||
sed -i "s/-O2/-march=$CPU_TYPE -O2/i" $TARGET/etc/portage/make.conf
|
sed -i "s/-O2/-march=$CPU_TYPE -O2/i" $TARGET/etc/portage/make.conf
|
||||||
echo 'ACCEPT_KEYWORDS="amd64"' >>$TARGET/etc/portage/make.conf
|
echo 'ACCEPT_KEYWORDS="amd64"' >>$TARGET/etc/portage/make.conf
|
||||||
@ -255,6 +262,7 @@ configurePortage() {
|
|||||||
mkdir -p $TARGET/etc/portage/package.mask
|
mkdir -p $TARGET/etc/portage/package.mask
|
||||||
echo "dev-lang/rust" >$TARGET/etc/portage/package.mask/rust
|
echo "dev-lang/rust" >$TARGET/etc/portage/package.mask/rust
|
||||||
}
|
}
|
||||||
|
|
||||||
buildGentoo() {
|
buildGentoo() {
|
||||||
echo "[Install Base System]"
|
echo "[Install Base System]"
|
||||||
echo
|
echo
|
||||||
@ -309,6 +317,7 @@ buildGentoo() {
|
|||||||
chroot $TARGET /setup.sh
|
chroot $TARGET /setup.sh
|
||||||
rm -f $TARGET/setup.sh
|
rm -f $TARGET/setup.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
installPackages() {
|
installPackages() {
|
||||||
/usr/bin/emerge -uDN $PACKAGES --autounmask-write
|
/usr/bin/emerge -uDN $PACKAGES --autounmask-write
|
||||||
/usr/sbin/etc-update -q --automode -5
|
/usr/sbin/etc-update -q --automode -5
|
||||||
@ -348,6 +357,7 @@ btrfs_filesytem() {
|
|||||||
umount $TARGET
|
umount $TARGET
|
||||||
mount -o $COMPRESSION,subvol=@$ROOT_NAME $BTRFS $TARGET
|
mount -o $COMPRESSION,subvol=@$ROOT_NAME $BTRFS $TARGET
|
||||||
}
|
}
|
||||||
|
|
||||||
services() {
|
services() {
|
||||||
echo '[zram0]' >/etc/systemd/zram-generator.conf
|
echo '[zram0]' >/etc/systemd/zram-generator.conf
|
||||||
echo 'zram-size = ram * 2' >>/etc/systemd/zram-generator.conf
|
echo 'zram-size = ram * 2' >>/etc/systemd/zram-generator.conf
|
||||||
@ -401,12 +411,14 @@ installSteam() {
|
|||||||
emerge -uDN @world
|
emerge -uDN @world
|
||||||
emerge -uDN games-util/steam-launcher app-emulation/wine-vanilla
|
emerge -uDN games-util/steam-launcher app-emulation/wine-vanilla
|
||||||
}
|
}
|
||||||
|
|
||||||
locale() {
|
locale() {
|
||||||
echo "ln -sf /usr/share/zoneinfo/US/Mountain /etc/localtime" >>$TARGET/setup.sh
|
echo "ln -sf /usr/share/zoneinfo/US/Mountain /etc/localtime" >>$TARGET/setup.sh
|
||||||
echo "hwclock --systohc" >>$TARGET/setup.sh
|
echo "hwclock --systohc" >>$TARGET/setup.sh
|
||||||
echo "en_US.UTF-8 UTF-8" >$TARGET/etc/locale.gen
|
echo "en_US.UTF-8 UTF-8" >$TARGET/etc/locale.gen
|
||||||
echo "locale-gen" >>$TARGET/setup.sh
|
echo "locale-gen" >>$TARGET/setup.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
fstab() {
|
fstab() {
|
||||||
mkdir $TARGET/etc
|
mkdir $TARGET/etc
|
||||||
echo "UUID=$(/sbin/blkid -s UUID -o value ${EFI}) /efi vfat umask=0077 0 1" >$TARGET/etc/fstab
|
echo "UUID=$(/sbin/blkid -s UUID -o value ${EFI}) /efi vfat umask=0077 0 1" >$TARGET/etc/fstab
|
||||||
@ -448,6 +460,7 @@ btrfs-tweaks() {
|
|||||||
chattr -R +C $i
|
chattr -R +C $i
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
initialize-disk() {
|
initialize-disk() {
|
||||||
SWAP_SIZE=$(expr $(cat /proc/meminfo | head -1 | cut -d ':' -f2 | sed 's/ //g' | sed 's/kB//') / 1000 / 1000)
|
SWAP_SIZE=$(expr $(cat /proc/meminfo | head -1 | cut -d ':' -f2 | sed 's/ //g' | sed 's/kB//') / 1000 / 1000)
|
||||||
SWAP_SIZE_END="$(expr $SWAP_SIZE + $ROOT_PARTITION_SIZE)"
|
SWAP_SIZE_END="$(expr $SWAP_SIZE + $ROOT_PARTITION_SIZE)"
|
||||||
@ -543,6 +556,7 @@ tweaks() {
|
|||||||
menu
|
menu
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
download-setup() {
|
download-setup() {
|
||||||
clear
|
clear
|
||||||
echo "[Choose Deployment Type]"
|
echo "[Choose Deployment Type]"
|
||||||
@ -575,6 +589,7 @@ download-setup() {
|
|||||||
cp -f gentoo-kde.sh $TARGET/usr/bin/
|
cp -f gentoo-kde.sh $TARGET/usr/bin/
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
menu() {
|
menu() {
|
||||||
clear
|
clear
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user