Nix: mesa mismatch info (#542)

* Warn people to use the latest mesa version when using the Hyprland flake

Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
This commit is contained in:
Tiago Dinis 2024-03-17 20:02:59 +00:00 committed by GitHub
parent 22d5e48e9b
commit 8e5e35c745
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -76,6 +76,33 @@ this:
Don't forget to change the `HOSTNAME` to your actual hostname! Don't forget to change the `HOSTNAME` to your actual hostname!
{{< callout >}}
If you start experiencing lag and FPS drops in games or programs like Blender on
**stable** NixOS when using the Hyprland flake, it most likely is a `mesa`
version mismatch between your system and Hyprland.
You can fix this issue by using `mesa` from Hyprland's `nixpkgs` input:
```nix
{pkgs, inputs, ...}: let
pkgs-unstable = inputs.hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in {
hardware.opengl = {
package = pkgs-unstable.mesa.drivers;
# if you also want 32-bit support (e.g for Steam)
driSupport32Bit = true;
package32 = pkgs-unstable.pkgsi686Linux.mesa.drivers;
};
}
```
For more details, see
[issue #5148](https://github.com/hyprwm/Hyprland/issues/5148).
{{< /callout >}}
{{< /tab >}} {{< /tab >}}
{{< tab "Flake package, Nix stable" >}} {{< tab "Flake package, Nix stable" >}}