I’m having trouble to wrap my head around following problem.
I am configuring NixOS on my ThinkPad T430. I found that nixos-hardware includes a profile for the T430.
However this profile includes the i915 driver as early KMS. This does not work well with the T430 being docked with closed lid: The screen (external display) freezes as soon as the i915 module is loaded while the boot process continues (I can blindly enter my luks decryption passphrase, username, password, execute sway and the display shows something again).
Related (with the exception, that my system stays responsive):
Noteworthy, with the T430 not being docked (no external display) everything works fine. My current workaround is late KMS and letting greetd handle the display configuration right after i915 is being loaded.
But I’d still like to apply the nixos-hardware profile, since it includes other fixes for the T430. So here comes my question: How can I use
nixos-hardware.nixosModules.lenovo-thinkpad-t430 in my config while also overriding the
boot.initrd.kernelModules = [ "i915" ]; in the nixos-hardware/common/gpu/intel/default.nix file?
Edit: I read somewhere that something like
mkForce could be used. But this would override declarations of
boot.initrd.kernelModules in other places, AFAIK?