diff --git a/nixos/boxes/foureighty/default.nix b/nixos/boxes/foureighty/default.nix index 7b2a9d68..c7b57ae1 100644 --- a/nixos/boxes/foureighty/default.nix +++ b/nixos/boxes/foureighty/default.nix @@ -5,6 +5,7 @@ inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480 ./hardware-configuration.nix ./thermal.nix + ../../gfx-intel-dri2.nix ../../backups.nix ../../boot.nix ../../distributed-builds.nix diff --git a/nixos/gfx-intel-dri2.nix b/nixos/gfx-intel-dri2.nix new file mode 100644 index 00000000..d95d2b85 --- /dev/null +++ b/nixos/gfx-intel-dri2.nix @@ -0,0 +1,27 @@ +{ config, pkgs, ... }: { + services.xserver = { + videoDrivers = [ "intel" ]; + deviceSection = '' + Option "DRI" "2" + Option "TearFree" "true" + ''; + }; + + hardware.opengl = { + enable = true; + driSupport = true; + extraPackages = with pkgs; [ + vaapiIntel + vaapiVdpau + libvdpau-va-gl + intel-media-driver + ]; + }; + + nixpkgs.config = { + packageOverrides = pkgs: { + vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; + }; + }; + +} diff --git a/nixos/gfx-intel.nix b/nixos/gfx-intel.nix index 78ea00bf..01fab9d7 100644 --- a/nixos/gfx-intel.nix +++ b/nixos/gfx-intel.nix @@ -1,5 +1,5 @@ { config, pkgs, ... }: { - services.xserver.videoDrivers = [ "intel" ]; + services.xserver = { videoDrivers = [ "modesetting" ]; }; hardware.opengl = { enable = true;