refactor: extract 'nvidia' module
This commit is contained in:
22
modules/nvidia/default.nix
Normal file
22
modules/nvidia/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.allowedUnfree = [
|
||||
"nvidia-x11"
|
||||
"nvidia-persistenced"
|
||||
"nvidia-settings"
|
||||
];
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = true;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
}
|
||||
Reference in New Issue
Block a user