options follow my.schema to avoid conflicts

This commit is contained in:
2024-04-19 23:19:21 -06:00
parent f1a1656155
commit 36f4b83c82
30 changed files with 1502 additions and 1657 deletions

View 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;
};
};
};
}