From 90f156e1798056d28fdb62731e3fb61ac3337b32 Mon Sep 17 00:00:00 2001 From: Sneexy Date: Mon, 22 Apr 2024 09:29:59 -0500 Subject: [PATCH] chore: move opengl to machines configs --- machines/thonkpad/default.nix | 12 ++++++++++++ machines/thunkpad/default.nix | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/machines/thonkpad/default.nix b/machines/thonkpad/default.nix index 178f556..8743d9f 100644 --- a/machines/thonkpad/default.nix +++ b/machines/thonkpad/default.nix @@ -9,6 +9,7 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + # use shared configuration ../../config/nixos.nix ]; @@ -44,6 +45,17 @@ ]; }; + # opengl and graphics settings + # https://nixos.wiki/wiki/Accelerated_Video_Playback + hardware.opengl = { + enable = true; + extraPackages = with pkgs; [ + intel-media-driver # LIBVA_DRIVER_NAME=iHD + libvdpau-va-gl + ]; + }; + environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/machines/thunkpad/default.nix b/machines/thunkpad/default.nix index 1bc9416..82d3a0d 100644 --- a/machines/thunkpad/default.nix +++ b/machines/thunkpad/default.nix @@ -45,6 +45,17 @@ ]; }; + # opengl and graphics settings + # https://nixos.wiki/wiki/Accelerated_Video_Playback + hardware.opengl = { + enable = true; + extraPackages = with pkgs; [ + intel-media-driver # LIBVA_DRIVER_NAME=iHD + libvdpau-va-gl + ]; + }; + environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; + # TODO: refer to https://github.com/ahbnr/nixos-06cb-009a-fingerprint-sensor?tab=readme-ov-file#setup-based-on-fprintd-and-bingchs-driver # and update this part accordingly to make it easy to follow and do #services.fprintd.enable = false;