anchor.diff:    cfg = config.hardware.nvidia;
     pCfg = cfg.prime;
     syncCfg = pCfg.sync;
  +  offloadCfg = pCfg.offload;
  +  primeEnabled = syncCfg.enable || offloadCfg.enable;
   in
   
   {
  
positive.code:       optionals config.services.xserver.enable [ "nvidia" "nvidia_modeset" "nvidia_drm" ];
  
      # If requested enable modesetting via kernel parameter.
      boot.kernelParams = optional cfg.modesetting.enable "nvidia-drm.modeset=1";
  
      # Create /dev/nvidia-uvm when the nvidia-uvm module is loaded.
      services.udev.extraRules =
  
negative.code:         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 {
  