options follow my.schema to avoid conflicts
This commit is contained in:
25
modules/services/nvidia.nix
Normal file
25
modules/services/nvidia.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.my.services.nvidia.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.services.nvidia.enable {
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware = {
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
nvidia-vaapi-driver
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user