mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 06:18:03 +03:00
local drivers
This commit is contained in:
1 parent
7e965fe195
commit
a71d522e5a
76 files changed
+37344
-18
No files matched your search
@@ -0,0 +1,28 @@
|
||||
{ ... }:
|
||||
{
|
||||
flake.homeModules.home-mpv-intel-hard =
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = osConfig.programs.intel-hard;
|
||||
vk = (import "${inputs.intel-hard}/graphics").${cfg.vulkan.driver};
|
||||
icd = "${cfg.buildRoot}/${vk.icd}";
|
||||
runtimeLibPath = lib.makeLibraryPath (import "${inputs.intel-hard}/lib/runtime-libs.nix" pkgs);
|
||||
in
|
||||
{
|
||||
elars.mpv.wrapperRun = lib.mkIf cfg.enable ''
|
||||
if [ -f "${icd}" ]; then
|
||||
export VK_DRIVER_FILES="${icd}"
|
||||
export VK_ICD_FILENAMES="${icd}"
|
||||
export MESA_VK_DEVICE_SELECT="${cfg.pciId}"
|
||||
export LD_LIBRARY_PATH="${runtimeLibPath}''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||
unset MESA_GL_VERSION_OVERRIDE
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user