sorry but this ones just lots of shit
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.system.nvidia;
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.system.nvidia;
|
||||
in {
|
||||
options.system.nvidia = {
|
||||
enable = lib.mkEnableOption "enables nvidia";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
boot.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
|
||||
# boot.kernelModules = [ "nvidia" ];
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
boot.kernelModules = ["nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm"];
|
||||
# boot.kernelModules = [ "nvidia" ];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
@@ -21,8 +22,8 @@ in
|
||||
|
||||
# enable nvidia proprietary driver
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true; # required
|
||||
open = false; # use proprietary driver
|
||||
modesetting.enable = true; # required
|
||||
open = false; # use proprietary driver
|
||||
nvidiaSettings = true; # no shit
|
||||
powerManagement.enable = false; # can cause sleep issues
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
@@ -32,6 +33,5 @@ in
|
||||
hardware.nvidia-container-toolkit.enable = true;
|
||||
virtualisation.docker.daemon.settings.features.cdi = true;
|
||||
virtualisation.docker.rootless.daemon.settings.features.cdi = true;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user