There is a boot.kernelPatches
option you can (mis-)use to add additional configuration:
{ lib, ... }:
{
boot.kernelPatches = lib.singleton {
name = "enable-lirc";
patch = null;
extraConfig = ''
LIRC y
'';
};
}
This will affect the kernel you’re using in boot.kernelPackages
.