add nvidia to dionysus
This commit is contained in:
parent
88b27f3933
commit
df307e7525
4 changed files with 62 additions and 2 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
|
./nvidia.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
|
|
|
||||||
59
hosts/servers/dionysus/nvidia.nix
Normal file
59
hosts/servers/dionysus/nvidia.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
{lib, config, ...}:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
|
boot.blacklistedKernelModules = ["nouveau"];
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
graphics = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nvidia-container-toolkit.enable = true;
|
||||||
|
|
||||||
|
nvidia = {
|
||||||
|
# Modesetting is required.
|
||||||
|
modesetting.enable = true;
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
|
||||||
|
# Fine-grained power management. Turns off GPU when not in use.
|
||||||
|
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||||
|
powerManagement.finegrained = 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. Full list of
|
||||||
|
# supported GPUs is at:
|
||||||
|
# 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;
|
||||||
|
|
||||||
|
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
# package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
||||||
|
# version = "580.105.08";
|
||||||
|
|
||||||
|
# # Update these hashes to whatever nix tells you to,
|
||||||
|
# # and set them back to `lib.fakeHash` every time you
|
||||||
|
# # change the version.
|
||||||
|
# sha256_64bit = "sha256-2cboGIZy8+t03QTPpp3VhHn6HQFiyMKMjRdiV2MpNHU=";
|
||||||
|
# openSha256 = "sha256-FGmMt3ShQrw4q6wsk8DSvm96ie5yELoDFYinSlGZcwQ=";
|
||||||
|
# settingsSha256 = "sha256-YvzWO1U3am4Nt5cQ+b5IJ23yeWx5ud1HCu1U0KoojLY=";
|
||||||
|
|
||||||
|
# # You can leave these unspecified
|
||||||
|
# sha256_aarch64 = lib.fakeHash;
|
||||||
|
# persistencedSha256 = lib.fakeHash;
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -26,8 +26,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.blacklistedKernelModules = ["nouveau"];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "nixroot/root";
|
{ device = "nixroot/root";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@
|
||||||
{
|
{
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
|
boot.blacklistedKernelModules = ["nouveau"];
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
graphics = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue