28 lines
656 B
Nix
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"];
|
|
};
|
|
}
|