Hello all. New NixOS user, long time Linux enjoyer here.
I am trying to create a setup to migrate all of my machines over to NixOS, and some of them have RTX Nvidia cards on them, so I created an nvidia-rtx.nix file and set it to import to my main configuration.nix.
Here is my nvidia-rtx.nix
{ config, lib, pkgs, ... }:
{
options = {
# Define any custom options here if needed.
};
config = {
boot.kernelParams = [ "nvidia-drm.modeset=1" ];
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
# forceFullCompositionPipeline = true;
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
};
}
# Remove the line about forcefullcompositionpipeline if you get bad OpenGL and WebGL performance
I also have some X11 things that came with my configuration.nix
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "";
};
I seem to have an issue in which X11 works aside from performance issues from having a 1080p and 4K display at different refresh rates - but when I try to enter Plasma via Wayland, I get a black screen in which only my mouse is visible. To fix it, I have to force a reboot by holding the power button and then switch back into X11 at the login screen. Any ideas?