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 d6e08b8..2b3607c 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 54c7736..a305d1f 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 c458591..d460679 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"; }; };