discrete graphics on in BIOS - NVIDIA

add the following to /etc/nixos/configuration.nix:

  # Enable OpenGL
  hardware.opengl = {
    enable = true;
    driSupport = true;
    driSupport32Bit = true;
  };
 
  services.xserver.videoDrivers = ["nvidia"];
  hardware.nvidia = {
    nvidiaSettings = true;
    forceFullCompositionPipeline = true;
    package = config.boot.kernelPackages.nvidiaPackages.production;
  };
 
services.xserver.dpi = 96;
 

switchable graphics on in BIOS - iGPU

# https://discourse.nixos.org/t/eliminate-screen-tearing-with-intel-mesa/14724
services.xserver.videoDrivers = [ "intel" ];
  services.xserver.deviceSection = ''
    Option "DRI" "2"
    Option "TearFree" "true"
  '';

Everything else worked fine out of the box - Microphone, Webcam, Bluetooth, Sound, external ports