graphical: move nvidia to toplevel, remove
This commit is contained in:
parent
b9b4835a07
commit
a128529f97
2 changed files with 0 additions and 31 deletions
|
|
@ -1,31 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
name = "games";
|
|
||||||
cfg = config.nixowos.graphical.${name};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./mangohud.nix
|
|
||||||
./steam.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
options.nixowos.graphical.${name} = {
|
|
||||||
enable = lib.mkEnableOption name;
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
nixowos.graphical.${name} = lib.mkDefault {
|
|
||||||
mangohud.enable = true;
|
|
||||||
steam.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# load ntsync, which can improve performance
|
|
||||||
# for games running through wine/proton using it
|
|
||||||
boot.kernelModules = [ "ntsync" ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
39
nvidia.nix
Normal file
39
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 = 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue