move the nvidia hardware code

This commit is contained in:
Noa Aarts 2024-04-29 22:51:53 +02:00
parent 63b8017817
commit 8abdc7eaaf
3 changed files with 23 additions and 27 deletions

View file

@ -8,7 +8,6 @@
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
./nvidia.nix
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
]; ];

View file

@ -34,4 +34,27 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.opengl = {
enable = true;
driSupport = true;
};
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
# NOTE change this if borked
powerManagement = {
enable = false;
finegrained = false;
};
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
} }

View file

@ -1,26 +0,0 @@
{ config, lib, pkgs, ... }:
{
hardware.opengl = {
enable = true;
driSupport = false;
};
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
# NOTE change this if borked
powerManagement = {
enable = false;
finegrained = false;
};
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
}