anchor.diff:          Configure X to allow external NVIDIA GPUs when using optimus.
         '';
       };
  +
  +    hardware.nvidia.prime.offload.enable = mkOption {
  +      type = types.bool;
  +      default = false;
  +      description = ''
  +        Enable render offload support using the NVIDIA proprietary driver via PRIME.
  +
  +        If this is enabled, then the bus IDs of the NVIDIA and Intel GPUs have to be
  +        specified (<option>hardware.nvidia.prime.nvidiaBusId</option> and
  +        <option>hardware.nvidia.prime.intelBusId</option>).
  +      '';
  +    };
     };
   
     config = mkIf enabled {
  
positive.code:       }
  
        {
          assertion = syncCfg.enable -> pCfg.nvidiaBusId != "" && pCfg.intelBusId != "";
          message = ''
            When NVIDIA Optimus via PRIME is enabled, the GPU bus IDs must configured.
          '';
        }
      ];
  
  
negative.code:   cfg = config.hardware.nvidia;
    pCfg = cfg.prime;
    syncCfg = pCfg.sync;
    offloadCfg = pCfg.offload;
    primeEnabled = syncCfg.enable || offloadCfg.enable;
  in
  
  {
  