diff --git a/gentoo.sh b/gentoo.sh index 01007ba..8e6a9ac 100644 --- a/gentoo.sh +++ b/gentoo.sh @@ -38,23 +38,30 @@ SSID='123456' WIRELESS_INTERFACE='wlan0' COMPRESSION='compress=zstd:10' FLATPAKS+=() -SERVICES+=(cronie libvirt smartd cronie avahi-daemon cups grub-btrfsd sddm NetworkManager dev-zram0.swap) +SERVICES+=(cronie gdm libvirt smartd cronie cups grub-btrfsd sddm NetworkManager dev-zram0.swap) MAKEOPTS="-j$(cat /proc/cpuinfo | grep -i processor | grep -vi 'model' | wc -l)" -DESKTOP_USE_FLAGS="-bluetooth wxwidgets jumbo-build kernel-install hwaccel sasl -gpm proprietary-codecs screencast systemd x264 pulseaudio firmware nfsv4 caps zeroconf dbus sound-server X -browser-integration desktop-portal minimal -gnome qt5 kde dvd alsa gui -wayland device-mapper efiemu themes truetype btrfs seccomp cgroup-hybrid geoclue -webengine boot browser keeshare network opengl" -SERVER_USE_FLAGS="-gtk kernel-install -pipewire -bluetooth udev -sound -ipv6 sasl usb usbredir spice vhost-net virtfs -vnc -wayland -gpm -proprietary-codecs -screencast systemd pulseaudio sound-server -x264 firmware nfsv4 caps zeroconf dbus -X -browser-integration desktop-portal minimal -gnome -qt5 -kde -dvd -alsa -gui device-mapper efiemu themes truetype btrfs seccomp cgroup-hybrid geoclue -webengine boot -browser -keeshare network -opengl" -BASE_PACKAGES=" app-containers/netavark mail-mta/postfix app-admin/sysstat sys-apps/smartmontools sys-process/cronie net-fs/samba net-fs/nfs-utils net-firewall/iptables dev-python/pip sys-fs/inotify-tools net-analyzer/nmap x11-apps/xhost app-misc/screen app-portage/gentoolkit sys-fs/dosfstools app-admin/sudo sys-apps/systemd sys-boot/plymouth sys-apps/zram-generator app-eselect/eselect-repository dev-vcs/git sys-boot/refind sys-block/parted sys-boot/grub sys-block/zram-init sys-process/btop net-vpn/wireguard-tools sys-apps/flatpak app-editors/vim app-misc/fastfetch net-misc/yt-dlp app-containers/crun app-containers/podman net-fs/samba sys-fs/btrfs-progs net-print/cups " -DESKTOP_PACKAGES=" x11-drivers/xf86-input-evdev kde-apps/kcalc kde-apps/dolphin kde-apps/ark www-client/firefox plasma-meta app-editors/vscodium kde-apps/konsole media-gfx/krita kde-apps/kdegraphics-meta app-admin/keepassxc app-office/calligra net-im/telegram-desktop-bin net-misc/nextcloud-client net-im/neochat x11-misc/sddm media-video/vlc " +KDE_DESKTOP_USE_FLAGS="-samba -telemetry -bluetooth wxwidgets jumbo-build kernel-install hwaccel sasl -gpm proprietary-codecs screencast systemd x264 pulseaudio firmware nfsv4 caps -zeroconf dbus sound-server X -browser-integration desktop-portal minimal -gnome qt5 kde dvd alsa gui -wayland device-mapper efiemu themes truetype btrfs seccomp cgroup-hybrid geoclue -webengine boot browser keeshare network opengl" +GNOME_DESKTOP_USE_FLAGS="keyring -samba minizip -gnome-online-accounts -telemetry -bluetooth wxwidgets jumbo-build kernel-install hwaccel sasl -gpm proprietary-codecs screencast systemd x264 pulseaudio firmware nfsv4 caps -zeroconf dbus sound-server 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" +SERVER_USE_FLAGS="-samba -gtk kernel-install -pipewire -bluetooth udev -sound -ipv6 sasl usb usbredir spice vhost-net virtfs -vnc -wayland -gpm -proprietary-codecs -screencast systemd pulseaudio sound-server -x264 firmware nfsv4 caps -zeroconf dbus -X -browser-integration desktop-portal minimal -gnome -qt5 -kde -dvd -alsa -gui device-mapper efiemu themes truetype btrfs seccomp cgroup-hybrid geoclue -webengine boot -browser -keeshare network -opengl" +BASE_PACKAGES=" app-containers/netavark mail-mta/postfix app-admin/sysstat sys-apps/smartmontools sys-process/cronie net-fs/nfs-utils net-firewall/iptables dev-python/pip sys-fs/inotify-tools net-analyzer/nmap x11-apps/xhost app-misc/screen app-portage/gentoolkit sys-fs/dosfstools app-admin/sudo sys-apps/systemd sys-boot/plymouth sys-apps/zram-generator app-eselect/eselect-repository dev-vcs/git sys-boot/refind sys-block/parted sys-boot/grub sys-block/zram-init sys-process/btop net-vpn/wireguard-tools sys-apps/flatpak app-editors/vim app-misc/fastfetch net-misc/yt-dlp app-containers/crun app-containers/podman sys-fs/btrfs-progs net-print/cups " +GNOME_DESKTOP_PACKAGES=" app-text/evince gnome-extra/gnome-system-monitor dev-libs/qtkeychain gnome-extra/gnome-browser-connector sys-power/power-profiles-daemon gnome-extra/gnome-shell-extensions gnome-extra/gnome-calculator gnome-extra/gnome-tweaks app-office/libreoffice media-gfx/gimp gnome-light www-client/firefox app-editors/vscodium app-admin/keepassxc net-im/telegram-desktop-bin net-misc/nextcloud-client media-video/vlc " +KDE_DESKTOP_PACKAGES=" x11-drivers/xf86-input-evdev kde-apps/kcalc kde-apps/dolphin kde-apps/ark www-client/firefox plasma-meta app-editors/vscodium kde-apps/konsole media-gfx/krita kde-apps/kdegraphics-meta app-admin/keepassxc app-office/calligra net-im/telegram-desktop-bin net-misc/nextcloud-client net-im/neochat x11-misc/sddm media-video/vlc " +#Change/Set Desktop: GNOME/KDE +DESKTOP_ENVIRONMENT="gnome" +DESKTOP_PACKAGES=$GNOME_DESKTOP_PACKAGES +DESKTOP_USE_FLAGS=$GNOME_DESKTOP_USE_FLAGS +# USE_FLAGS="" PACKAGES="" INSTALL_TYPE="desktop" TMPFS_SIZE="32G" CPU_TYPE="znver3" -TAR_EXCLUDES="--exclude=/var/db/repos/* --exclude=/var/lib/systemd/coredump/* --exclude=/var/cache/distfiles --exclude=/var/lib/flatpak --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=/run/user/* --exclude=/run/media/* --exclude=/var/db/repos/* --exclude=/var/lib/systemd/coredump/* --exclude=/var/cache/distfiles --exclude=/var/lib/flatpak --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 " DISTCC_HOSTS+=(192.168.0.44/2 192.168.0.146/2 192.168.0.153/2 192.168.0.148/2 192.168.0.63/2 192.168.0.51/4 192.168.0.80/12) DISTCC_LISTEN="192.168.0.0/24" DISTCC_CORES="30" #Add Masked Packages to the Array -MASKED_PACKAGES+=(media-libs/harfbuzz games-util/game-device-udev-rules dev-lang/python dev-python/pyrate-limiter dev-python/moddb dev-python/pypresence games-util/lutris games-util/steam-launcher app-misc/fastfetch net-im/telegram-desktop-bin dev-libs/yyjson) +MASKED_PACKAGES+=(www-client/firefox net-im/element-desktop-bin media-libs/harfbuzz games-util/game-device-udev-rules dev-lang/python dev-python/pyrate-limiter dev-python/moddb dev-python/pypresence games-util/lutris games-util/steam-launcher app-misc/fastfetch net-im/telegram-desktop-bin dev-libs/yyjson) partitionDetection() { #This is used for the installer to do script-based actions @@ -255,9 +262,8 @@ buildGentoo() { echo echo if [[ $INSTALL_TYPE = *desktop* ]]; then - GENTOO_PROFILE=$(chroot $TARGET /usr/bin/eselect profile list | grep -i plasma | grep systemd | grep -i merged | head -1 | cut -d '[' -f2 | cut -d ']' -f1) + GENTOO_PROFILE=$(chroot $TARGET /usr/bin/eselect profile list | grep -i $DESKTOP_ENVIRONMENT | grep systemd | grep -i merged | head -1 | cut -d '[' -f2 | cut -d ']' -f1) chroot $TARGET /usr/bin/eselect profile set $GENTOO_PROFILE - echo ">=net-dns/$(find $TARGET/var/db/repos/gentoo/net-dns/avahi/ | grep ebuild | tail -1 | cut -d '/' -f9 | sed 's/.ebuild//i') -gtk" >$TARGET/etc/portage/package.use/zz-autounmask echo ">=x11-misc/$(find $TARGET/var/db/repos/gentoo/x11-misc/appmenu-gtk-module/ | grep ebuild | tail -1 | cut -d '/' -f9 | sed 's/.ebuild//i') wayland" >>$TARGET/etc/portage/package.use/zz-autounmask else chroot $TARGET /usr/bin/eselect profile set $(/usr/bin/eselect profile list | grep -Evi 'gnome|plasma' | grep systemd | grep -i merged | head -1 | cut -d '[' -f2 | cut -d ']' -f1) @@ -383,6 +389,7 @@ installSteam() { emerge --sync steam-overlay emerge games-util/steam-launcher app-emulation/wine-vanilla games-util/lutris --autounmask-write etc-update -q --automode -5 + emerge -DN @world emerge games-util/steam-launcher app-emulation/wine-vanilla games-util/lutris } @@ -506,7 +513,7 @@ menu() { echo "[1] Setup Disk" echo "[2] Download Gentoo Installation Files" echo "[3] Install Base System" - echo "[4] Install OS Packages" + echo "[4] Install Desktop Environment and Packages" echo "[5] Install the bootloader and User Accounts" echo "[6] Backup" echo "[7] Restore" @@ -549,9 +556,7 @@ menu() { tar xf $STAGE3_FILE -C $TARGET/ fstab sed -i "s/-O2/-march=$CPU_TYPE -O2/i" $TARGET/etc/portage/make.conf - echo "USE=\"$USE_FLAGS\"" >>$TARGET/etc/portage/make.conf - echo "VIDEO_CARDS=\"amdgpu radeon radeonsi fbdev intel vesa nvidia-drivers\"" >>$TARGET/etc/portage/make.conf - + if [ -z "$DISTCC_LISTEN" ]; then echo echo "Not using DistCC" @@ -566,6 +571,9 @@ menu() { echo "FEATURES=\"distcc\"" >>$TARGET/etc/portage/make.conf fi + echo "VIDEO_CARDS=\"amdgpu radeon radeonsi fbdev intel vesa nvidia-drivers\"" >>$TARGET/etc/portage/make.conf + echo "USE=\"$USE_FLAGS\"" >>$TARGET/etc/portage/make.conf + echo 'EMERGE_DEFAULT_OPTS="--jobs 10"' >>$TARGET/etc/portage/make.conf echo 'ACCEPT_KEYWORDS="amd64"' >>$TARGET/etc/portage/make.conf cp -f /etc/resolv.conf $TARGET/etc/