anchor.diff:      };
   
       services.xserver.serverLayoutSection = optionalString syncCfg.enable ''
  -      Inactive "Device-modesetting[0]"
  +      Inactive "Device-${igpuDriver}[0]"
       '' + optionalString offloadCfg.enable ''
         Option "AllowNVIDIAGPUScreens"
       '';
   
       services.xserver.displayManager.setupCommands = optionalString syncCfg.enable ''
         # Added by nvidia configuration module for Optimus/PRIME.
  -      ${pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource modesetting NVIDIA-0
  +      ${pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource ${igpuDriver} NVIDIA-0
         ${pkgs.xorg.xrandr}/bin/xrandr --auto
       '';
   
  
positive.code:     #   "nvidia" driver, in order to allow the X server to start without any outputs.
      # - Add a separate Device section for the Intel GPU, using the "modesetting"
      #   driver and with the configured BusID.
      # - Reference that Device section from the ServerLayout section as an inactive
      #   device.
      # - Configure the display manager to run specific `xrandr` commands which will
      #   configure/enable displays connected to the Intel GPU.
  
      services.xserver.useGlamor = mkDefault offloadCfg.enable;
  
      services.xserver.drivers = optional primeEnabled {
        name = "modesetting";
        display = offloadCfg.enable;
        deviceSection = ''
          BusID "${pCfg.intelBusId}"
          ${optionalString syncCfg.enable ''Option "AccelMethod" "none"''}
        '';
      } ++ singleton {
  
negative.code:       '';
      };
  
      hardware.nvidia.prime.amdgpuBusId = mkOption {
        type = types.str;
        default = "";
        example = "PCI:4:0:0";
        description = ''
          Bus ID of the AMD APU. You can find it using lspci; for example if lspci
  	shows the AMD APU at "04:00.0", set this option to "PCI:4:0:0".
        '';
      };
  
      hardware.nvidia.prime.sync.enable = mkOption {
        type = types.bool;
        default = false;
  