This commit is contained in:
LordGrimmauld 2024-03-16 17:56:41 +01:00
parent 07d54bd920
commit 351dba4281
2 changed files with 30 additions and 0 deletions

View file

@ -66,5 +66,6 @@ in {
./modules/networking.nix
./modules/toolchains.nix
./modules/sound.nix
./modules/opengl.nix
];
}

29
modules/opengl.nix Normal file
View file

@ -0,0 +1,29 @@
{ pkgs, config, lib, ... }: let
cfg = config.grimmShared;
in {
config = with cfg; lib.mkIf (enable && graphical) {
# Enable OpenGL
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [];
};
boot.kernelParams = [ "nouveau.config=NvGspRm=1" ];
environment.sessionVariables = {
__GL_LOG_MAX_ANISO = "0";
__GL_SHADER_DISK_CACHE = "1";
__GL_SYNC_TO_VBLANK = "0";
__GL_THREADED_OPTIMIZATIONS = "1";
__GL_VRR_ALLOWED = "1";
# MESA_LOADER_DRIVER_OVERRIDE="zink";
# FLATPAK_GL_DRIVERS="mesa-git";
};
environment.systemPackages = with pkgs; [
glfw
];
};
}