Headlamp operation is controlled by the BCM (body control module) based on inputs from the combination switch (lighting switch). When the lighting switch is placed in the 2ND position, the BCM receives an input signal requesting the headlamps (and tail lamps) illuminate. The BCM sends a signal, via the CAN communication lines, to the IPDM E/R (intelligent power distribution module engine room) requesting the headlamps be turned ON. The CPU (central processing unit) located in the IPDM E/R controls ground for the headlamp high and headlamp low relay coils. These relays direct power to the respective headlamps, which then illuminate.
Pretty complex for a headlamp circuit. This means you probably need the Nissan scan tool to read the B and U codes to figure out if a new BCM or other part is needed.