graphical: move nvidia to toplevel, remove

This commit is contained in:
Elec3137 2026-03-23 21:02:35 -07:00
commit a128529f97
2 changed files with 0 additions and 31 deletions

39
nvidia.nix Normal file
View 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 = lib.mkDefault {
# 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;
};
};
}