From c52fbb6cd0bd12b8483f94b45d731458807d480d Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Wed, 5 Jul 2023 08:50:35 +0400 Subject: [PATCH] Configure Gentoo --- files.sh | 3 + gentoo/etc/default/grub | 76 +++++++++++++++++++ gentoo/etc/dracut.conf | 2 + gentoo/etc/portage/make.conf | 4 +- .../etc/portage/package.accept_keywords/misc | 1 + gentoo/etc/portage/package.env/ccache | 1 + gentoo/etc/portage/package.license/firmware | 1 + gentoo/etc/portage/package.license/misc | 1 + gentoo/etc/portage/package.use/zz-autounmask | 26 ++----- gentoo/var/lib/portage/world | 4 +- 10 files changed, 96 insertions(+), 23 deletions(-) create mode 100644 gentoo/etc/default/grub create mode 100644 gentoo/etc/dracut.conf diff --git a/files.sh b/files.sh index dbef879..e53e303 100644 --- a/files.sh +++ b/files.sh @@ -16,7 +16,10 @@ install_file root root 644 '/etc/fish/functions/rvm.fish' common if [ "$PREFIX" = 'gentoo' ]; then echo install_file root root 644 '/etc/ccache.conf' gentoo +install_file root rott 644 '/etc/dracut.conf' gentoo +echo install_file root root 644 '/etc/conf.d/display-manager' gentoo +install_file root root 644 '/etc/default/grub' gentoo install_file root root 644 '/etc/env.d/90xsession' gentoo install_file root portage 644 '/var/lib/portage/world' gentoo echo diff --git a/gentoo/etc/default/grub b/gentoo/etc/default/grub new file mode 100644 index 0000000..17e5bd0 --- /dev/null +++ b/gentoo/etc/default/grub @@ -0,0 +1,76 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# +# To populate all changes in this file you need to regenerate your +# grub configuration file afterwards: +# 'grub-mkconfig -o /boot/grub/grub.cfg' +# +# See the grub info page for documentation on possible variables and +# their associated values. + +GRUB_DISTRIBUTOR="Gentoo" + +# Default menu entry +#GRUB_DEFAULT=0 + +# Boot the default entry this many seconds after the menu is displayed +#GRUB_TIMEOUT=5 +#GRUB_TIMEOUT_STYLE=menu + +# Append parameters to the linux kernel command line +GRUB_CMDLINE_LINUX="rd.luks.allow-discards root=UUID=4cd32c9d-2923-456f-8019-5554391c46a5 rd.luks.uuid=34b0671d-8dcb-42a3-a363-34cff525fb1f" +# +# Examples: +# +# Boot with network interface renaming disabled +# GRUB_CMDLINE_LINUX="net.ifnames=0" +# +# Boot with systemd instead of sysvinit (openrc) +# GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd" + +# Append parameters to the linux kernel command line for non-recovery entries +#GRUB_CMDLINE_LINUX_DEFAULT="" + +# Uncomment to disable graphical terminal (grub-pc only) +#GRUB_TERMINAL=console + +# The resolution used on graphical terminal. +# Note that you can use only modes which your graphic card supports via VBE. +# You can see them in real GRUB with the command `vbeinfo'. +#GRUB_GFXMODE=640x480 + +# Set to 'text' to force the Linux kernel to boot in normal text +# mode, 'keep' to preserve the graphics mode set using +# 'GRUB_GFXMODE', 'WIDTHxHEIGHT'['xDEPTH'] to set a particular +# graphics mode, or a sequence of these separated by commas or +# semicolons to try several modes in sequence. +#GRUB_GFXPAYLOAD_LINUX= + +# Path to theme spec txt file. +# The starfield is by default provided with use truetype. +# NOTE: when enabling custom theme, ensure you have required font/etc. +#GRUB_THEME="/boot/grub/themes/starfield/theme.txt" + +# Background image used on graphical terminal. +# Can be in various bitmap formats. +#GRUB_BACKGROUND="/boot/grub/mybackground.png" + +# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel +GRUB_DISABLE_LINUX_UUID=true + +# Comment if you don't want GRUB to pass "root=PARTUUID=xxx" parameter to kernel +GRUB_DISABLE_LINUX_PARTUUID=true + +# Uncomment to disable generation of recovery mode menu entries +GRUB_DISABLE_RECOVERY=true + +# Uncomment to disable generation of the submenu and put all choices on +# the top-level menu. +# Besides the visual affect of no sub menu, this makes navigation of the +# menu easier for a user who can't see the screen. +GRUB_DISABLE_SUBMENU=y + +# Uncomment to play a tone when the main menu is displayed. +# This is useful, for example, to allow users who can't see the screen +# to know when they can make a choice on the menu. +#GRUB_INIT_TUNE="60 800 1" diff --git a/gentoo/etc/dracut.conf b/gentoo/etc/dracut.conf new file mode 100644 index 0000000..5f09e0d --- /dev/null +++ b/gentoo/etc/dracut.conf @@ -0,0 +1,2 @@ +add_dracutmodules+=" base crypt dm fs-lib fstab-sys lvm rootfs-block udev-rules " +add_fstab="/etc/fstab" diff --git a/gentoo/etc/portage/make.conf b/gentoo/etc/portage/make.conf index 89aeb45..eea2c90 100644 --- a/gentoo/etc/portage/make.conf +++ b/gentoo/etc/portage/make.conf @@ -1,3 +1,5 @@ +USE="dist-kernel vaapi vdpau" + COMMON_FLAGS="-pipe -O2 -march=native -mtune=native" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" GRUB_PLATFORMS="efi-64" @@ -5,7 +7,7 @@ LC_MESSAGES="C.utf8" INPUT_DEVICES="libinput" PYTHON_TARGETS="python3_10 python3_11 python3_12" RUBY_TARGETS="ruby31" -VIDEO_CARDS="nouveau" +VIDEO_CARDS="nvidia" ACCEPT_LICENSE="-* @FREE" EMERGE_DEFAULT_OPTS="--ask --ask-enter-invalid" diff --git a/gentoo/etc/portage/package.accept_keywords/misc b/gentoo/etc/portage/package.accept_keywords/misc index d4008ba..123a541 100644 --- a/gentoo/etc/portage/package.accept_keywords/misc +++ b/gentoo/etc/portage/package.accept_keywords/misc @@ -2,3 +2,4 @@ games-action/minecraft-launcher ~amd64 media-video/obs-studio ~amd64 net-im/element-desktop-bin ~amd64 net-misc/zerotier ~amd64 +sys-firmware/nvidia-firmware ~amd64 diff --git a/gentoo/etc/portage/package.env/ccache b/gentoo/etc/portage/package.env/ccache index 6b10e69..dbfa2b8 100644 --- a/gentoo/etc/portage/package.env/ccache +++ b/gentoo/etc/portage/package.env/ccache @@ -1,4 +1,5 @@ dev-lang/spidermonkey ccache.conf +dev-qt/qtdeclarative ccache.conf dev-util/cmake ccache.conf mail-client/thunderbird ccache.conf media-libs/mesa ccache.conf diff --git a/gentoo/etc/portage/package.license/firmware b/gentoo/etc/portage/package.license/firmware index e85e348..3027c83 100644 --- a/gentoo/etc/portage/package.license/firmware +++ b/gentoo/etc/portage/package.license/firmware @@ -3,4 +3,5 @@ # Updates may fix security issues. sys-firmware/intel-microcode intel-ucode +sys-firmware/nvidia-firmware NVIDIA-r2 sys-kernel/linux-firmware linux-fw-redistributable diff --git a/gentoo/etc/portage/package.license/misc b/gentoo/etc/portage/package.license/misc index 9a2b382..6d5645c 100644 --- a/gentoo/etc/portage/package.license/misc +++ b/gentoo/etc/portage/package.license/misc @@ -1,2 +1,3 @@ games-action/minecraft-launcher Mojang net-misc/zerotier BSL-1.1 +x11-drivers/nvidia-drivers NVIDIA-r2 diff --git a/gentoo/etc/portage/package.use/zz-autounmask b/gentoo/etc/portage/package.use/zz-autounmask index 054bf83..5ec5327 100644 --- a/gentoo/etc/portage/package.use/zz-autounmask +++ b/gentoo/etc/portage/package.use/zz-autounmask @@ -1,22 +1,6 @@ -# required by app-shells/fish-3.4.0::gentoo ->=dev-libs/libpcre2-10.42-r1 pcre32 - -# required by www-client/firefox-102.12.0::gentoo[system-libvpx] ->=media-libs/libvpx-1.12.0-r1 postproc - -# required by media-sound/pulseaudio-daemon-16.1-r7::gentoo[alsa,alsa-plugin] -# required by media-libs/libpulse-16.1-r2::gentoo -# required by www-client/firefox-bin-114.0.2::gentoo[pulseaudio] +>=dev-libs/libpcre2-10.42-r1 pcre32 +>=media-libs/libvpx-1.12.0-r1 postproc >=media-plugins/alsa-plugins-1.2.7.1-r1 pulseaudio - -# required by net-im/telegram-desktop-4.8.1-r2::gentoo ->=media-video/ffmpeg-4.4.4-r2 opus vpx - -# required by www-client/chromium-114.0.5735.198::gentoo ->=net-libs/nodejs-20.2.0 inspector - -# required by www-client/chromium-114.0.5735.198::gentoo ->=sys-libs/zlib-1.2.13-r1 minizip - -# required by x11-misc/openbox-menu-0.8.1::gentoo[icons] ->=x11-wm/openbox-3.6.1-r5 imlib +>=media-video/ffmpeg-4.4.4-r2 opus vpx +>=sys-libs/zlib-1.2.13-r1 minizip +>=x11-wm/openbox-3.6.1-r5 imlib diff --git a/gentoo/var/lib/portage/world b/gentoo/var/lib/portage/world index 8194e4f..be95385 100644 --- a/gentoo/var/lib/portage/world +++ b/gentoo/var/lib/portage/world @@ -50,10 +50,12 @@ net-wireless/wpa_supplicant sys-apps/dbus sys-apps/mlocate sys-auth/elogind +sys-block/gparted sys-block/io-scheduler-udev-rules sys-block/parted sys-boot/grub sys-firmware/intel-microcode +sys-firmware/nvidia-firmware sys-fs/cryptsetup sys-fs/dosfstools sys-fs/lvm2 @@ -63,8 +65,8 @@ sys-kernel/gentoo-kernel-bin sys-kernel/linux-firmware sys-process/cronie sys-process/htop -www-client/chromium www-client/firefox x11-base/xorg-server x11-misc/lightdm +x11-misc/vdpauinfo x11-themes/mate-themes