From a4f5fa96924b78d1ff102ca83b8b329c435819ca Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Tue, 17 Dec 2019 18:53:29 -0700 Subject: [PATCH] enable hardware acceleration --- configurations/hp500281.nix | 15 ++++++++++++++- profiles/graphical/default.nix | 3 +++ users/nrd.nix | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/configurations/hp500281.nix b/configurations/hp500281.nix index d6e08b8a..2b3607cf 100644 --- a/configurations/hp500281.nix +++ b/configurations/hp500281.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ lib, pkgs, ... }: let inherit (builtins) readFile; in @@ -19,6 +19,19 @@ in boot.kernelModules = [ "kvm-intel" ]; + environment.sessionVariables = { + LIBVA_DRIVER_NAME = "iHD"; + }; + + hardware.cpu.intel.updateMicrocode = true; + + hardware.opengl.extraPackages = with pkgs; [ + vaapiIntel + vaapiVdpau + libvdpau-va-gl + intel-media-driver + ]; + networking.networkmanager = { enable = true; }; diff --git a/profiles/graphical/default.nix b/profiles/graphical/default.nix index 54c77361..a305d1fe 100644 --- a/profiles/graphical/default.nix +++ b/profiles/graphical/default.nix @@ -9,6 +9,9 @@ in ./sway ]; + hardware.opengl.enable = true; + hardware.opengl.driSupport = true; + sound.enable = true; environment = { diff --git a/users/nrd.nix b/users/nrd.nix index c4585912..d4606798 100644 --- a/users/nrd.nix +++ b/users/nrd.nix @@ -86,6 +86,8 @@ in enable = true; config = { ytdl-format = "bestvideo[height<=?1080]+bestaudio/best"; + hwdec = "auto"; + vo = "gpu"; }; };