voidconf/modules/nvidia.nix
2023-12-16 19:26:15 +01:00

28 lines
656 B
Nix

{ lib, config, ... }:
with lib;
let cfg = config.voidcruiser.nvidia;
in {
options.voidcruiser.nvidia = {
enable = mkEnableOption "Enables proprietary Nvidia drivers and related config";
};
config = mkIf cfg.enable {
hardware = {
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.stable;
powerManagement = {
enable = false;
finegrained = false;
};
open = false;
nvidiaSettings = true;
};
};
services.xserver.videoDrivers = ["nvidia"];
};
}