dotfiles/out-of-tree/nixGL/default.nix

42 lines
1.3 KiB
Nix
Raw Permalink Normal View History

2023-01-13 06:42:21 +00:00
{
## Nvidia informations.
2022-12-30 08:45:15 +00:00
# Version of the system kernel module. Let it to null to enable auto-detection.
2023-06-18 00:46:31 +00:00
nvidiaVersion ? null,
# Hash of the Nvidia driver .run file. null is fine, but fixing a value here
2022-12-30 08:45:15 +00:00
# will be more reproducible and more efficient.
2023-06-18 00:46:31 +00:00
nvidiaHash ? null,
# Alternatively, you can pass a path that points to a nvidia version file
2022-12-30 08:45:15 +00:00
# and let nixGL extract the version from it. That file must be a copy of
# /proc/driver/nvidia/version. Nix doesn't like zero-sized files (see
# https://github.com/NixOS/nix/issues/3539 ).
2023-06-18 00:46:31 +00:00
nvidiaVersionFile ? null,
# Enable 32 bits driver
2022-12-30 08:45:15 +00:00
# This is on by default, you can switch it to off if you want to reduce a
# bit the size of nixGL closure.
2023-06-18 00:46:31 +00:00
enable32bits ? true,
# Make sure to enable config.allowUnfree to the instance of nixpkgs to be
2022-12-30 08:45:15 +00:00
# able to access the nvidia drivers.
2023-06-18 00:46:31 +00:00
pkgs ?
import <nixpkgs> {
config = {allowUnfree = true;};
},
# Enable all Intel specific extensions which only works on x86_64
enableIntelX86Extensions ? true,
2022-12-30 08:45:15 +00:00
}:
pkgs.callPackage ./nixGL.nix ({
2023-06-18 00:46:31 +00:00
inherit
nvidiaVersion
nvidiaVersionFile
nvidiaHash
enable32bits
;
}
// (
if enableIntelX86Extensions
then {}
else {
intel-media-driver = null;
vaapiIntel = null;
}
))