Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Gentoo Chat
  • Search

post your make.conf

Opinions, ideas and thoughts about Gentoo. Anything and everything about Gentoo except support questions.
Post Reply
  • Print view
Advanced search
558 posts
  • Page 23 of 23
    • Jump to page:
  • Previous
  • 1
  • …
  • 19
  • 20
  • 21
  • 22
  • 23
Author
Message
mid-kid
n00b
n00b
Posts: 26
Joined: Sun Aug 24, 2014 9:51 am

  • Quote

Post by mid-kid » Tue Mar 10, 2026 10:16 pm

/etc/portage/make.conf/aa-base:

Code: Select all

# Enable --ask and quiet down some noisy features.
# I want these to be the defaults, really.
CLEAN_DELAY=0
EMERGE_DEFAULT_OPTS="--ask --nospinner --quiet-unmerge-warn"
/etc/portage/make.conf/ab-binpkg:

Code: Select all

# Enable binary packages as a local cache
EMERGE_DEFAULT_OPTS="$EMERGE_DEFAULT_OPTS --usepkg --with-bdeps=n"
FEATURES="$FEATURES buildpkg -buildpkg-live"
/etc/portage/make.conf/ba-hardware:

Code: Select all

NPROC="4"
MAKEOPTS="-j$NPROC -l5"

CPU_FLAGS_X86="aes avx avx2 bmi1 bmi2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3"  # cpuid2cpuflags 17
MARCH="znver1"
MARCH_FLAGS="-march=$MARCH"  # resolve-march-native 6.0.1

VIDEO_CARDS="amdgpu"
INPUT_DEVICES="libinput synaptics"
/etc/portage/make.conf/main:

Code: Select all

PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"

LC_MESSAGES=C
EMERGE_DEFAULT_OPTS="$EMERGE_DEFAULT_OPTS --keep-going --with-bdeps=y --binpkg-respect-use=n --binpkg-changed-deps=n"
FEATURES="$FEATURES pkgdir-index-trusted"
BINPKG_COMPRESS="bzip2"
PORTAGE_BZIP2_COMMAND="lbzip2"

# eclass variables
NINJA_STATUS="[%p %f/%t] "
CMAKE_MAKEFILE_GENERATOR="ninja"
EGIT_CLONE_TYPE="shallow"

# https://github.com/gentoo-mirror/lto-overlay/blob/master/sys-config/ltoize/files/make.conf.lto.defines
FLAGS_OPTIM_BASE="-O3 -w"
FLAGS_OPTIM_LTO="-flto -fuse-linker-plugin"
FLAGS_OPTIM_PARALLEL="-flto=$NPROC"  # --param=lto-max-streaming-parallelism=$NPROC" (deprecated, WPA stage now supports jobserver)
FLAGS_OPTIM_MORE="-fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition"
FLAGS_COMMON="$FLAGS_OPTIM_BASE $MARCH_FLAGS $FLAGS_OPTIM_LTO $FLAGS_OPTIM_PARALLEL $FLAGS_OPTIM_MORE"
RUSTFLAGS="-Copt-level=3 -Ctarget-cpu=$MARCH -Clinker-plugin-lto -Clinker=$CHOST-clang -Clink-arg=-fuse-ld=lld"
CFLAGS="$CFLAGS $FLAGS_COMMON"
CXXFLAGS="$CXXFLAGS $FLAGS_COMMON"
FCFLAGS="$FCFLAGS $FLAGS_COMMON"
FFLAGS="$FFLAGS $FLAGS_COMMON"

USE_LANGS="-cxx -perl -ruby -python -vala"
USE_CODECS="-a52 -aac -cdda -dts -mad -mp3 -mpeg -xvid -cdr -dvdr -dvd"
USE_FORMATS="-mng -tiff -webp -avif -zstd -svg -pdf"
USE_SOFTWARE="-networkmanager -systemd -gpm -cryptsetup -bluetooth -spell -sdl -btrfs -ldap -pulseaudio -pipewire -screencast"
USE_GUI="-wayland -qt5 -qt6 -gtk4" # -gui -gtk -gtk2 -gtk3 -wxwidgets  # Common frontends
USE="$USE_LANGS $USE_CODECS $USE_FORMATS $USE_SOFTWARE $USE_GUI -branding -telemetry -cet dist-kernel modules-compress lto pgo vaapi io-uring v4l fontconfig vim-syntax zsh-completion"
BOOTSTRAP_USE="$BOOTSTRAP_USE -zstd -cet"
INSTALL_MASK="/etc/apparmor.d /etc/systemd /lib/systemd /usr/lib/systemd"
ACCEPT_LICENSE="-* @FREE"
L10N="ca es-ES es en-GB en-US en"
I often try to not overcomplicate configurations, the closer I run to a "default", the better. Unfortunately, I'm also a tinkerer, and gentoo provides the power, so I will tweak things when I am curious to try something, or really want to deviate from the defaults for some reason, and that is mostly how this configuration grew. Lots of things in here have become a bit dated, such as the ACCEPT_LICENSE which is now the default. That said, I will never understand trying to configure every single USE flag or FEATURE key. The USE flags I remove here are mostly for things I prefer controlling manually in package.use instead. I do use pipewire, for example.

Tip for the many-USE-flag havers, try to avoid globally configuring flags that don't have a global definition in $(portageq get_repo_path / gentoo)/profiles/use.desc, as these will vary wildly between different packages, and might not do what you expect. Just use package.use for package-local flags. You can ask "quse -D" to describe a flag to you, and tell you if it's global or not. There's still a few global flags whose definition differs across packages, such as USE=sdl which is used for both sdl-as-audio-backend and sdl-as-graphical-frontend, but those are in the minority.
Top
b11n
Guru
Guru
User avatar
Posts: 303
Joined: Wed Mar 26, 2003 8:15 am
Location: New Zealand

  • Quote

Post by b11n » Wed Mar 11, 2026 2:19 am

mid-kid wrote:...
You should link to your repo, mid-kid. I can't remember how I found it, some time ago now, but I think it'd be pretty good reading for someone looking to learn a structured approach to Gentoo configuration.
Is there gas in the caaaaar?
Yes, there's gas in the caaaar
Top
mid-kid
n00b
n00b
Posts: 26
Joined: Sun Aug 24, 2014 9:51 am

  • Quote

Post by mid-kid » Sun Mar 15, 2026 12:59 pm

b11n wrote:
mid-kid wrote:...
You should link to your repo, mid-kid. I can't remember how I found it, some time ago now, but I think it'd be pretty good reading for someone looking to learn a structured approach to Gentoo configuration.
Thanks for the flattering words. I'd like to add a disclaimer that I don't necessarily endorse the choices I made in my config, as some of them are simply "because I can" and ill-advised, and others are mostly experiments. It's also riddled with flags that don't exist anymore and tweaks that bitrot. One of the best things about gentoo is that you can just experiment and fix things as you go, instead of having to declare a configuration upfront. Here goes a link: https://github.com/mid-kid/gentoo-config

I also don't think anyone should start with making a "well-structured" config from the onset. Just like everyone, I started with the stage3 defaults, installed everything I needed, and it organically grew from there. But it can help to look at what others are doing. Now I manage multiple gentoo machines, I've been toying with the idea of moving hardware-specific configs to a subfolder of make.profile/ and only changing the make.profile/parent file to inherit the right configuration for the machine, instead of having to keep a diff around.

Perhaps also worth plugging my livecd :P
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56082
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Mar 15, 2026 1:13 pm

mid-kid,

Is it time for you to play with steve ?
I see your make.conf is missing the settings that steve uses.

You are one of the few users I've seen that uses make.conf as a directory too.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
mid-kid
n00b
n00b
Posts: 26
Joined: Sun Aug 24, 2014 9:51 am

  • Quote

Post by mid-kid » Sun Mar 15, 2026 2:08 pm

NeddySeagoon wrote:Is it time for you to play with steve ?
Haha, I've had my eye on it since it was announced on the front page, and ninja (finally) supports the jobserver. It's a really awesome project. I'll definitely play with it for experiments where I'm building a lot of things in bulk, but for regular updates of my main machines, I'm not sure I'd like to give up the ease of setting per-package MAKEOPTS to control resource usage (unless something like steve starts existing to pause processes trying to acquire more memory/disk space until it frees up :P).
Still, thanks for the recommendation!
Top
mid-kid
n00b
n00b
Posts: 26
Joined: Sun Aug 24, 2014 9:51 am

  • Quote

Post by mid-kid » Sun Mar 15, 2026 3:29 pm

mid-kid wrote:unless something like steve starts existing to pause processes trying to acquire more memory until it frees up
I just learned about steve's --min-memory-avail option which is... very interesting. I will be trialling it, see how it goes.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56082
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Mar 15, 2026 3:35 pm

mid-kid,

The per package settings work with steve too.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
b11n
Guru
Guru
User avatar
Posts: 303
Joined: Wed Mar 26, 2003 8:15 am
Location: New Zealand

  • Quote

Post by b11n » Sun Mar 15, 2026 9:05 pm

mid-kid wrote:Thanks for the flattering words. I'd like to add a disclaimer that I don't necessarily endorse the choices I made in my config, as some of them are simply "because I can" and ill-advised, and others are mostly experiments. It's also riddled with flags that don't exist anymore and tweaks that bitrot.
haha, yeah there were definitely some eyebrow raising things in there, it was the first time I'd read a portage conf and actually felt something, like I was reading a semi-autobiographical novel and not a machine config. It was good in that it illustrated things that were pain points for you, and how you worked around them. But you're right, dotfiles (etc.) aren't for copy+pasting, but reading for inspiration, and your repo was for me.

I remember how I stumbled across it now, I was trying to come up with a modular config for my little farm of Gentoo machines - call it Enterprise Gentoo, or Gentoo for Workgroups 3.11 - and looking for inspiration on how die-hards manage theirs. There's not much written about it beyond what portage allows, (e.g. /etc/portage can be infinitely deep and structured however you want), but how to apply config to it beyond that is an exercise for the reader.

Obviously this is good, the whole point of Gentoo is that it's not opinionated, and you can do what you want. But the freedom to do what you want is accompanied by the freedom to mess it up, and write a giant cascade of USE flags, unmasks and patches that end up creating more work than it saves and breaking every other week.

I was looking to learn from other people's screw-ups the easy way. I'm still working on something, and will probably never finish.
Is there gas in the caaaaar?
Yes, there's gas in the caaaar
Top
Post Reply
  • Print view

558 posts
  • Page 23 of 23
    • Jump to page:
  • Previous
  • 1
  • …
  • 19
  • 20
  • 21
  • 22
  • 23

Return to “Gentoo Chat”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic