add nvidia gpu
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
./modules/sway/sway.nix
|
||||
# ./modules/gnome.nix
|
||||
./modules/printer.nix
|
||||
./modules/nvidia.nix
|
||||
./modules/nvim/default.nix
|
||||
# ./modules/tuxedo.nix
|
||||
./utils/modules/autoupgrade.nix
|
||||
|
||||
31
hosts/nb-01.cloonar.com/modules/nvidia.nix
Normal file
31
hosts/nb-01.cloonar.com/modules/nvidia.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{config, lib, pkgs, ...}: {
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
open = false;
|
||||
|
||||
nvidiaSettings = true;
|
||||
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
# Make sure to use the correct Bus ID values for your system!
|
||||
amdgpuBusId = "PCI:193:0:0";
|
||||
nvidiaBusId = "PCI:100:0:0";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user