Update gentoo.sh
This commit is contained in:
parent
7f70ec5bef
commit
360f916d66
50
gentoo.sh
50
gentoo.sh
@ -38,17 +38,15 @@ WIRELESS_INTERFACE='wlan0'
|
|||||||
DISK_PASSWORD='123456'
|
DISK_PASSWORD='123456'
|
||||||
COMPRESSION='compress=zstd:10'
|
COMPRESSION='compress=zstd:10'
|
||||||
FLATPAKS+=(io.exodus.Exodus us.zoom.Zoom app/com.valvesoftware.Steam/x86_64/stable app/net.lutris.Lutris)
|
FLATPAKS+=(io.exodus.Exodus us.zoom.Zoom app/com.valvesoftware.Steam/x86_64/stable app/net.lutris.Lutris)
|
||||||
SERVICES+=( cups pulseaudio.service pulseaudio.socket grub-btrfsd sddm NetworkManager dev-zram0.swap)
|
SERVICES+=(avahi-daemon cups pulseaudio.service pulseaudio.socket grub-btrfsd sddm NetworkManager dev-zram0.swap)
|
||||||
DESKTOP="KDE"
|
DESKTOP="KDE"
|
||||||
BROWSER="brave"
|
BROWSER="brave"
|
||||||
MAKEOPTS="-j12"
|
MAKEOPTS="-j12"
|
||||||
USE_FLAGS="zeroconf dbus daemon pulseaudio X -browser-integration desktop-portal minimal -gtk -gnome qt5 kde dvd alsa gui -wayland device-mapper efiemu themes truetype btrfs seccomp cgroup-hybrid geoclue -webengine boot browser keeshare network opengl"
|
USE_FLAGS="zeroconf dbus daemon pulseaudio X -browser-integration desktop-portal minimal -gtk -gnome qt5 kde dvd alsa gui -wayland device-mapper efiemu themes truetype btrfs seccomp cgroup-hybrid geoclue -webengine boot browser keeshare network opengl"
|
||||||
TMPFS_SIZE="32G"
|
TMPFS_SIZE="32G"
|
||||||
STAGE3="https://distfiles.gentoo.org/releases/amd64/autobuilds/20231022T164658Z/stage3-amd64-systemd-20231022T164658Z.tar.xz"
|
STAGE3="https://distfiles.gentoo.org/releases/amd64/autobuilds/20231022T164658Z/stage3-amd64-systemd-20231022T164658Z.tar.xz"
|
||||||
#Packages
|
BASE_PACKAGES=" plasma-meta sys-fs/inotify-tools kde-apps/kate kde-apps/konsole media-gfx/krita dev-util/sh net-analyzer/nmap x11-apps/xhost app-misc/screen net-im/element-desktop-bin app-portage/gentoolkit sys-fs/dosfstools app-admin/sudo sys-apps/systemd sys-boot/plymouth sys-apps/zram-generator x11-misc/sddm app-eselect/eselect-repository dev-vcs/git sys-boot/refind sys-block/parted sys-boot/grub sys-block/zram-init media-video/vlc app-office/calligra sys-process/btop net-vpn/wireguard-tools sys-apps/flatpak app-editors/vim app-vim/airline app-misc/neofetch net-misc/yt-dlp net-im/telegram-desktop net-misc/nextcloud-client app-containers/crun app-containers/podman app-office/calligra media-gfx/krita net-fs/samba sys-fs/btrfs-progs kde-apps/kdegraphics-meta app-admin/keepassxc net-print/cups "
|
||||||
BASE_PACKAGES=" plasma-meta net-analyzer/nmap x11-apps/xhost app-misc/screen net-im/element-desktop-bin app-portage/gentoolkit sys-fs/dosfstools app-admin/sudo sys-apps/systemd sys-boot/plymouth sys-apps/zram-generator x11-misc/sddm app-eselect/eselect-repository dev-vcs/git sys-boot/refind sys-block/parted sys-boot/grub sys-block/zram-init media-video/vlc app-office/calligra sys-process/btop net-vpn/wireguard-tools sys-apps/flatpak app-editors/vim app-vim/airline app-misc/neofetch net-misc/yt-dlp net-im/telegram-desktop net-misc/nextcloud-client app-containers/crun app-containers/podman app-office/calligra media-gfx/krita net-fs/samba sys-fs/btrfs-progs kde-apps/kdegraphics-meta app-admin/keepassxc net-print/cups "
|
|
||||||
#VIRTUALIZATION=" virt-manager qemu-system libvirt-daemon-system ovmf cockpit-machines"
|
#VIRTUALIZATION=" virt-manager qemu-system libvirt-daemon-system ovmf cockpit-machines"
|
||||||
PACKAGES=""
|
|
||||||
TAR_EXCLUDES="--exclude=/var/lib/flatpak --exclude=/opt/stable-diffusion-webui --exclude=/.snapshots --exclude=/snapshots --exclude=/var/backups --exclude=/volumes/* --exclude=/mnt/* --exclude=/var/tmp/* --exclude=/tmp/* --exclude=/raid/* --exclude=/root/* --exclude=/var/cache/apt/archives/* --exclude=/proc/* --exclude=/.snapshots/* --exclude=/var/lib/libvirt/* --exclude=/dev/* --exclude=/sys/* --exclude=/home/* --exclude=/var/lib/postgresql --exclude=/var/lib/containers --exclude=/opt/chatgpt "
|
TAR_EXCLUDES="--exclude=/var/lib/flatpak --exclude=/opt/stable-diffusion-webui --exclude=/.snapshots --exclude=/snapshots --exclude=/var/backups --exclude=/volumes/* --exclude=/mnt/* --exclude=/var/tmp/* --exclude=/tmp/* --exclude=/raid/* --exclude=/root/* --exclude=/var/cache/apt/archives/* --exclude=/proc/* --exclude=/.snapshots/* --exclude=/var/lib/libvirt/* --exclude=/dev/* --exclude=/sys/* --exclude=/home/* --exclude=/var/lib/postgresql --exclude=/var/lib/containers --exclude=/opt/chatgpt "
|
||||||
|
|
||||||
partitionDetection() {
|
partitionDetection() {
|
||||||
@ -61,11 +59,11 @@ partitionDetection() {
|
|||||||
partitionDetection
|
partitionDetection
|
||||||
|
|
||||||
auto_login() {
|
auto_login() {
|
||||||
mkdir -p $TARGET/etc/sddm.conf.d
|
mkdir -p $TARGET/etc/sddm.conf.d
|
||||||
echo "[Autologin]" >$TARGET/etc/sddm.conf.d/autologin
|
echo "[Autologin]" >$TARGET/etc/sddm.conf.d/autologin
|
||||||
echo "User=$USER" >>$TARGET/etc/sddm.conf.d/autologin
|
echo "User=$USER" >>$TARGET/etc/sddm.conf.d/autologin
|
||||||
echo "Session=plasma.desktop" >>$TARGET/etc/sddm.conf.d/autologin
|
echo "Session=plasma.desktop" >>$TARGET/etc/sddm.conf.d/autologin
|
||||||
echo "Relogin=false" >>$TARGET/etc/sddm.conf.d/autologin
|
echo "Relogin=false" >>$TARGET/etc/sddm.conf.d/autologin
|
||||||
}
|
}
|
||||||
|
|
||||||
hibernate-setup() {
|
hibernate-setup() {
|
||||||
@ -106,16 +104,15 @@ homeBackup() {
|
|||||||
os-backup() {
|
os-backup() {
|
||||||
umount $TARGET
|
umount $TARGET
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "[Mounting.....]"
|
||||||
|
echo
|
||||||
|
mount -o $COMPRESSION $BTRFS $TARGET
|
||||||
|
|
||||||
echo
|
if [ "$1" = "home" ]; then
|
||||||
echo "[Mounting.....]"
|
homeBackup
|
||||||
echo
|
fi
|
||||||
mount -o $COMPRESSION $BTRFS $TARGET
|
create-os-snapshots "$2" "$3"
|
||||||
|
|
||||||
if [ "$1" = "home" ]; then
|
|
||||||
homeBackup
|
|
||||||
fi
|
|
||||||
create-os-snapshots "$2" "$3"
|
|
||||||
|
|
||||||
ls $TARGET/
|
ls $TARGET/
|
||||||
umount $TARGET
|
umount $TARGET
|
||||||
@ -195,25 +192,24 @@ getInstallFiles() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildGentoo() {
|
buildGentoo() {
|
||||||
if [ ! -d "$TARGET/var/db/repos/gentoo/x11-misc" ]
|
if [ ! -d "$TARGET/var/db/repos/gentoo/x11-misc" ]; then
|
||||||
then
|
chroot $TARGET /usr/bin/emerge --sync
|
||||||
chroot $TARGET /usr/bin/emerge --sync
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
chroot $TARGET /usr/bin/eselect $(/usr/bin/eselect profile list | grep -i plasma | grep systemd | head -1 | cut -d '[' -f2 | cut -d ']' -f1)
|
chroot $TARGET /usr/bin/eselect $(/usr/bin/eselect profile list | grep -i plasma | grep systemd | head -1 | cut -d '[' -f2 | cut -d ']' -f1)
|
||||||
mkdir -p $TARGET/etc/portage/package.license
|
mkdir -p $TARGET/etc/portage/package.license
|
||||||
echo "*/* *" >$TARGET/etc/portage/package.license/license
|
echo "*/* *" >$TARGET/etc/portage/package.license/license
|
||||||
rm -rf $TARGET/etc/portage/package.accept_keywords
|
rm -rf $TARGET/etc/portage/package.accept_keywords
|
||||||
echo "net-im/element-desktop-bin ~amd64" >$TARGET/etc/portage/package.accept_keywords
|
#echo "net-im/element-desktop-bin ~amd64" >$TARGET/etc/portage/package.accept_keywords
|
||||||
echo "media-video/vlc ~amd64" >>$TARGET/etc/portage/package.accept_keywords
|
#echo "media-video/vlc ~amd64" >>$TARGET/etc/portage/package.accept_keywords
|
||||||
echo "dev-qt/qtgui ~amd64" >>$TARGET/etc/portage/package.accept_keywords
|
#echo "dev-qt/qtgui ~amd64" >>$TARGET/etc/portage/package.accept_keywords
|
||||||
chroot $TARGET /usr/bin/emerge --verbose --update --deep --newuse @world --autounmask-write
|
chroot $TARGET /usr/bin/emerge --verbose --update --deep --newuse @world --autounmask-write
|
||||||
chroot $TARGET etc-update -q --automode -5
|
chroot $TARGET etc-update -q --automode -5
|
||||||
#The line is a workaround per bug https://bugs.gentoo.org/832963
|
#The line is a workaround per bug https://bugs.gentoo.org/832963
|
||||||
chroot $TARGET /usr/bin/emerge --verbose --update --deep --newuse dev-qt/qtgui
|
chroot $TARGET /usr/bin/emerge --verbose --update --deep --newuse dev-qt/qtgui
|
||||||
chroot $TARGET /usr/bin/emerge --verbose --update --deep --newuse @world
|
chroot $TARGET /usr/bin/emerge --verbose --update --deep --newuse @world
|
||||||
locale
|
locale
|
||||||
chroot $TARGET /usr/bin/emerge sys-kernel/gentoo-sources sys-kernel/dracut sys-kernel/genkernel
|
chroot $TARGET /usr/bin/emerge sys-kernel/gentoo-sources sys-kernel/genkernel
|
||||||
chroot $TARGET eselect kernel set 1
|
chroot $TARGET eselect kernel set 1
|
||||||
chroot $TARGET genkernel --cachedir=/var/tmp/portage --tmpdir=/var/tmp/portage --install --no-clean all
|
chroot $TARGET genkernel --cachedir=/var/tmp/portage --tmpdir=/var/tmp/portage --install --no-clean all
|
||||||
chroot $TARGET /usr/bin/emerge $BASE_PACKAGES --autounmask-write
|
chroot $TARGET /usr/bin/emerge $BASE_PACKAGES --autounmask-write
|
||||||
@ -270,7 +266,7 @@ bootloader() {
|
|||||||
echo "GRUB_TIMEOUT=1" >>/etc/default/grub
|
echo "GRUB_TIMEOUT=1" >>/etc/default/grub
|
||||||
echo "GRUB_THEME=/boot/grub/themes/starfield/theme.txt" >>/etc/default/grub
|
echo "GRUB_THEME=/boot/grub/themes/starfield/theme.txt" >>/etc/default/grub
|
||||||
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=gentoo
|
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=gentoo
|
||||||
dracut --hostonly --kver $(ls /lib/modules/) --force
|
#dracut --hostonly --kver $(ls /lib/modules/) --force
|
||||||
grub-mkconfig -o /boot/grub/grub.cfg
|
grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
refind-install
|
refind-install
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user