2022-09-14 03:53:30 +00:00
|
|
|
{ pkgs, config, ... }:
|
|
|
|
{
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
|
|
services.xserver.videoDrivers = [ "nvidia" ];
|
2023-02-01 03:19:31 +00:00
|
|
|
|
|
|
|
# This enables vulkan layers
|
|
|
|
# hardware = {
|
|
|
|
# opengl =
|
|
|
|
# let
|
|
|
|
# fn = oa: {
|
|
|
|
# nativeBuildInputs = oa.nativeBuildInputs ++ [ pkgs.glslang ];
|
|
|
|
# mesonFlags = oa.mesonFlags ++ [ "-Dvulkan-layers=device-select,overlay" ];
|
|
|
|
# patches = oa.patches ++ [ ./mesa-vulkan-layer-nvidia.patch ];
|
|
|
|
# postInstall = oa.postInstall + ''
|
|
|
|
# mv $out/lib/libVkLayer* $drivers/lib
|
2022-09-14 03:53:30 +00:00
|
|
|
|
|
|
|
#Device Select layer
|
2023-02-01 03:19:31 +00:00
|
|
|
# layer=VkLayer_MESA_device_select
|
|
|
|
# substituteInPlace $drivers/share/vulkan/implicit_layer.d/''${layer}.json \
|
|
|
|
# --replace "lib''${layer}" "$drivers/lib/lib''${layer}"
|
2022-09-14 03:53:30 +00:00
|
|
|
|
|
|
|
#Overlay layer
|
2023-02-01 03:19:31 +00:00
|
|
|
# layer=VkLayer_MESA_overlay
|
|
|
|
# substituteInPlace $drivers/share/vulkan/explicit_layer.d/''${layer}.json \
|
|
|
|
# --replace "lib''${layer}" "$drivers/lib/lib''${layer}"
|
|
|
|
# '';
|
|
|
|
# };
|
|
|
|
# in
|
|
|
|
# with pkgs; {
|
|
|
|
# enable = true;
|
|
|
|
# driSupport32Bit = true;
|
|
|
|
# package = (mesa.overrideAttrs fn).drivers;
|
|
|
|
# package32 = (pkgsi686Linux.mesa.overrideAttrs fn).drivers;
|
|
|
|
# };
|
|
|
|
# };
|
2022-09-14 03:53:30 +00:00
|
|
|
|
|
|
|
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
|
|
}
|