initial
This commit is contained in:
commit
b4c9b055fb
20 changed files with 1540 additions and 0 deletions
39
graphical/nvidia.nix
Normal file
39
graphical/nvidia.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
name = "nvidia";
|
||||
cfg = config.nixowos.graphical.${name};
|
||||
in
|
||||
{
|
||||
options.nixowos.graphical.${name} = {
|
||||
enable = lib.mkEnableOption name;
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# enable nvidia drivers (not just for xorg!)
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
# powerManagement.enable = false;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
open = true;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue