Window Manager - i7-8700 with integrated graphics

I installed NixOS on a new computer today and spent several hours trying to work out how to get the window manager to work. The graphics are integrated and the processor is i7-8700.

In the end what worked was to set

boot.kernelPackages = pkgs.linuxPackages_4_19;
boot.kernelParams = ["i195.alpha_support=1"];
services.xserver.videoDrivers = ["intel"];

then reboot.

I have no idea if this is something that can be upstreamed but there we go.

i195.alpha_support=1i915.alpha_support=1 and it should be fine on 4.14 if I remember what I did correctly back then. i915.alpha_support=1 isn’t needed on 4.19 for i7-8700.

I mistyped that option in my actual config so perhaps the option is not actually needed. Upgrading the kernel packages definitely is though I think.

Just got that problem recently, I know this post is old but is one of the ones i followed.
To solve it, I have a intel.nix file with this config:

{ config, lib, pkgs, ... }:

  nixpkgs.config.allowUnfree = true;
  nixpkgs.config.packageOverrides = pkgs: {
    vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
  boot.kernelParams = [

  #boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18" (lib.mkDefault pkgs.linuxPackages_latest));

  boot.kernelPackages = pkgs.linuxPackages_6_0; # this is to solve the blackscreen problem
  hardware.opengl.enable = true;
  environment.variables = {
      VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl");
  hardware.opengl.extraPackages = with pkgs; [

Also I added in hardware-configuration.nix: = lib.mkDefault config.hardware.enableRedistributableFirmware;
boot.initrd.kernelModules = [ "i915" ];

And also i comented:

#services.xserver.videoDrivers = [ "intel" ];

Since then seems like xserver choose it by himself (with that unccommented didn’t work properly)