Refactor modules style
This commit is contained in:
parent
ed2a7f94cf
commit
cc95386f1a
44 changed files with 455 additions and 297 deletions
28
nixosModules/services/graphics/nvidia/default.nix
Normal file
28
nixosModules/services/graphics/nvidia/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
nvidia.enable = lib.mkEnableOption
|
||||
"Enables nvidia with proprietary drivers";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.nvidia.enable {
|
||||
# Enable OpenGL
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvidia-vaapi-driver
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue