backward compat
This commit is contained in:
parent
86f1fcdeb6
commit
ae375933f3
@ -1,4 +1,5 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
lib.mkMerge [
|
||||
{
|
||||
# assumes common-gpu-nvidia from nixos-hardware is also added
|
||||
# TODO: should we move it from flake.nix to here?
|
||||
@ -6,8 +7,15 @@
|
||||
# https://github.com/NixOS/nixos-hardware/blob/master/common/gpu/nvidia/prime.nix
|
||||
|
||||
hardware.opengl.enable = true;
|
||||
}
|
||||
(lib.mkIf (lib.versionOlder (lib.versions.majorMinor lib.version) "24.11") {
|
||||
hardware.opengl.driSupport = true;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
})
|
||||
(lib.mkIf (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.11") {
|
||||
hardware.nvidia.open = true;
|
||||
})
|
||||
{
|
||||
|
||||
nixpkgs.config.openglSupport = true; # why is this not set by hardware.opengl.enable ?
|
||||
nixpkgs.config.cudaSupport = true;
|
||||
@ -22,8 +30,14 @@
|
||||
(lib.hasInfix "cublas" (lib.toLower (lib.getName pkg)))
|
||||
];
|
||||
|
||||
}
|
||||
(
|
||||
/* lib.mkIf (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.11") { */
|
||||
(lib.optionalAttrs (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.11") {
|
||||
programs.nix-required-mounts.enable = true;
|
||||
programs.nix-required-mounts.presets.nvidia-gpu.enable = true;
|
||||
})
|
||||
{
|
||||
|
||||
# https://nixos.wiki/wiki/Nvidia
|
||||
|
||||
@ -121,3 +135,4 @@
|
||||
/**/
|
||||
};
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user