[Hardware/Mesa] Enable asking for bleeding-edge mesa

This commit is contained in:
Antoine Viallon 2023-05-02 20:40:07 +02:00
parent 8b87ab5f2d
commit c75abbeffa
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -27,6 +27,12 @@ in {
description = "Wether to enable (unsafe) mesa optimizations";
example = false;
};
unstable = mkOption {
default = false;
type = types.bool;
description = "Wether or not to use mesa from nixpkgs-unstable";
example = config.aviallon.general.unsafeOptimizations;
};
package = mkOption {
default = pkgs.mesa;
type = packageWithDefaults;
@ -54,6 +60,9 @@ in {
config = mkIf cfg.enable {
programs.corectrl.enable = mkDefault config.hardware.opengl.enable;
aviallon.hardware.mesa.package = mkIf cfg.unstable pkgs.unstable.mesa;
aviallon.hardware.mesa.package32 = mkIf cfg.unstable pkgs.unstable.driversi686Linux.mesa;
aviallon.hardware.mesa.internal = mkIf cfg.optimized {
package = mkDefault (
optimizePkg { } cfg.package);