aboutsummaryrefslogtreecommitdiff
path: root/nix/modules/nvidia.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/modules/nvidia.nix')
-rw-r--r--nix/modules/nvidia.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/nix/modules/nvidia.nix b/nix/modules/nvidia.nix
new file mode 100644
index 0000000..b59035c
--- /dev/null
+++ b/nix/modules/nvidia.nix
@@ -0,0 +1,21 @@
+{ config, lib, pkgs, ... }:
+{
+ hardware = {
+ opengl.extraPackages = with pkgs; [
+ vaapiVdpau
+ libvdpau-va-gl
+ nvidia-vaapi-driver
+ ];
+
+ nvidia = {
+ modesetting.enable = true;
+ powerManagement = {
+ enable = true;
+ finegrained = false;
+ };
+ nvidiaSettings = true;
+ open = false;
+ package = config.boot.kernelPackages.nvidiaPackages.stable;
+ };
+ };
+}