summaryrefslogtreecommitdiff
path: root/machines/khad
diff options
context:
space:
mode:
authorDevin Finlinson <devin.finlinson@pm.me>2023-10-10 21:33:44 -0600
committerDevin Finlinson <devin.finlinson@pm.me>2023-10-10 21:33:44 -0600
commit2b99ae266413686fc383b98d6e877580ba442739 (patch)
tree529ecd80f4de0a6e2d46b113e034c99233eef967 /machines/khad
parentb3114d88077f41011e25f46419aa20a1bd31fb3d (diff)
better nvidia drivers, should support wayland now
Diffstat (limited to 'machines/khad')
-rw-r--r--machines/khad/configuration.nix22
1 files changed, 21 insertions, 1 deletions
diff --git a/machines/khad/configuration.nix b/machines/khad/configuration.nix
index 7a754cf..ffed45a 100644
--- a/machines/khad/configuration.nix
+++ b/machines/khad/configuration.nix
@@ -33,7 +33,27 @@
};
services.xserver.videoDrivers = [ "nvidia" ];
- hardware.opengl.driSupport32Bit = true;
+ hardware.opengl. {
+ enable = true;
+ # if hardware.opengl.driSupport is enable, mesa is installed and provides Vulkan of supported hardware.
+ driSupport = true;
+ # needed by nvidia-docker
+ driSupport32Bit = true;
+ };
+ hardware.nvidia = {
+ # Optionally, you may need to select the appropriate driver version for your specific GPU.
+ packge = config.boot.kernelPackages.nvidiapackages.stable;
+
+ # Modesetting is needed for most Wayland compositors
+ modesetting.enable = true;
+ # Use the open source version of the kernel module
+ # Only available on driver 515.53.04+
+ open = false;
+
+ powerManagement.enable = true;
+ };
+ virtualization.docker.enableNvidia = true; # for nvidia-docker
+
environment.shellInit = ''export NIXPATH="/nix/var/nix/profiles/per-user/$USER/channels:nixos-config=/etc/nixos/machines/khad/configuration.nix"'';
# Set your time zone.