Intel and nvidia gpu - get intel pci id

nix-shell -p pciutils --run "lspci -nn | grep VGA"
0000:01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117GL [T600] [10de:1fb1] (rev a1)

sudo lshw -c display

       description: nvidia-drmdrmfb
       product: nvidia-drmdrmfb
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: /dev/fb0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list rom fb
       configuration: depth=32 driver=nvidia latency=0 mode=3840x2160 resolution=3840,2160 visual=truecolor xres=3840 yres=2160
       resources: iomemory:600-5ff iomemory:600-5ff irq:183 memory:52000000-52ffffff memory:6000000000-600fffffff memory:6010000000-6011ffffff ioport:3000(size=128) memory:c0000-dffff
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 0c
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm bus_master cap_list
       configuration: driver=i915 latency=0
       resources: iomemory:600-5ff iomemory:400-3ff irq:123 memory:6014000000-6014ffffff memory:4000000000-400fffffff ioport:4000(size=64) memory:4010000000-4016ffffff memory:4020000000-40ffffffff

For nvidia it is 1fb1 . How to find the intel egpu pci id to be set in boot.kernelParams = [ "i915.force_probe=<device ID>" ]; ?

looks like: "PCI:0:0:2"

nix-shell -p pciutils --run "lspci -s 0:0:2 "
0000:00:02.0 Display controller: Intel Corporation AlderLake-S GT1 (rev 0c)

looks to be right

How to get the pci id for "i915.force_probe=<device ID>" as next step?

I’m not sure what your intel device ID is, but you should set up prime using this, and then choose offload or sync. = {
		intelBusId = "PCI:0:0:2";
		nvidiaBusId = "PCI:0:1:0";

lspci might not be reporting everything because of the drivers not being setup, so add this, reboot and retry the command, for reference, this is what it looks like on my system

─λ nix-shell -p pciutils --run "lspci -nn | grep VGA"
00:02.0 VGA compatible controller [0300]: Intel Corporation Raptor Lake-P [Iris Xe Graphics] [8086:a7a0] (rev 04)
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA107M [GeForce RTX 3050 Mobile] [10de:25a2] (rev a1)