From c75abbeffabc99c6b3b3c6dff354bacb8f1faea2 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Tue, 2 May 2023 20:40:07 +0200 Subject: [PATCH] [Hardware/Mesa] Enable asking for bleeding-edge mesa --- hardware/mesa.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hardware/mesa.nix b/hardware/mesa.nix index afea435..aca662b 100644 --- a/hardware/mesa.nix +++ b/hardware/mesa.nix @@ -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);