Wow. It has been over a decade since I built a Linux kernel for embedded system purposes.

boot.kernelPatches = [ {
name = "minimal-config";
patch = null;
extraConfig = ''
CONFIG_CORE_SMALL y
CONFIG_NET_SMALL y
...
'';
} ];

@SusanPotter this is being built with nix? That's a pleasingly small config. I mean, I find the number of lines of config you have to pass to get that, pleasingly short.
@0x2ba22e11 yes, using Nix. That snippet is only the part for the kernel. There are a couple of other things for the system config that I elided.
@SusanPotter I'm impressed because I remember configuring Linux in the 00s and having to go through a huge menu with hundreds of options, and ending up with an unbootable system on about half by attempts (usually because I accidentally left out the driver for either my root FS or my hard disk controller. 😅)

@0x2ba22e11 yes, I remember when make menuconfig was new (was it 2.5.x?) and thinking this is great but when you need to change a bunch of options, it was still quite cumbersome. Cross compiling kernels for different targets using Nix is nice too:
https://nixos-and-flakes.thiscute.world/development/cross-platform-compilation

I wouldn't have the time to tinker with embedded Linux again without these tools (or never get anything done).

Cross-platform Compilation | NixOS & Flakes Book

An unofficial and opinionated book for beginners

NixOS & Flakes Book