about summary refs log tree commit diff
path: root/nixos/modules/hardware
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-04-08 21:44:49 +0300
committerK900 <me@0upti.me>2023-04-08 21:45:46 +0300
commit727f9f0fbdbdf71b8d3b3aa87a6d3e482a72e8d2 (patch)
tree8d6785649019418052a53357edfd4bccb6f21110 /nixos/modules/hardware
parent54731a8cea6d8b9d4fcb9ca7cbfc75ae1e07a171 (diff)
downloadnixlib-727f9f0fbdbdf71b8d3b3aa87a6d3e482a72e8d2.tar
nixlib-727f9f0fbdbdf71b8d3b3aa87a6d3e482a72e8d2.tar.gz
nixlib-727f9f0fbdbdf71b8d3b3aa87a6d3e482a72e8d2.tar.bz2
nixlib-727f9f0fbdbdf71b8d3b3aa87a6d3e482a72e8d2.tar.lz
nixlib-727f9f0fbdbdf71b8d3b3aa87a6d3e482a72e8d2.tar.xz
nixlib-727f9f0fbdbdf71b8d3b3aa87a6d3e482a72e8d2.tar.zst
nixlib-727f9f0fbdbdf71b8d3b3aa87a6d3e482a72e8d2.zip
Revert "nixos/opengl: add mesaPackage option"
This reverts commit bf1785d0a91d5d3bb0ef3c2afe031554f17a87e4.
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r--nixos/modules/hardware/opengl.nix41
1 files changed, 8 insertions, 33 deletions
diff --git a/nixos/modules/hardware/opengl.nix b/nixos/modules/hardware/opengl.nix
index 7b5e669d47f4..9108bcbd1652 100644
--- a/nixos/modules/hardware/opengl.nix
+++ b/nixos/modules/hardware/opengl.nix
@@ -69,48 +69,19 @@ in
       package = mkOption {
         type = types.package;
         internal = true;
-        default = cfg.mesaPackage;
         description = lib.mdDoc ''
           The package that provides the OpenGL implementation.
-
-          The default is Mesa's drivers which should cover all OpenGL-capable
-          hardware. If you want to use another Mesa version, adjust
-          {option}`mesaPackage`.
         '';
       };
+
       package32 = mkOption {
         type = types.package;
         internal = true;
-        default = cfg.mesaPackage32;
-        description = lib.mdDoc ''
-          Same as {option}`package` but for the 32-bit OpenGL implementation on
-          64-bit systems. Used when {option}`driSupport32Bit` is set.
-        '';
-      };
-
-      mesaPackage = mkOption {
-        type = types.package;
-        default = pkgs.mesa;
-        defaultText = literalExpression "pkgs.mesa";
-        example = literalExpression "pkgs.mesa_22";
         description = lib.mdDoc ''
-          The Mesa driver package used for rendering support on the system.
-
-          You should only need to adjust this if you require a newer Mesa
-          version for your hardware or because you need to patch a bug.
+          The package that provides the 32-bit OpenGL implementation on
+          64-bit systems. Used when {option}`driSupport32Bit` is
+          set.
         '';
-        apply = mesa: mesa.drivers or (throw "`mesa` package must have a `drivers` output.");
-      };
-      mesaPackage32 = mkOption {
-        type = types.package;
-        default = pkgs.pkgsi686Linux.mesa;
-        defaultText = literalExpression "pkgs.pkgsi686Linux.mesa";
-        example = literalExpression "pkgs.pkgsi686Linux.mesa_22";
-        description = lib.mdDoc ''
-          Same as {option}`mesaPackage` but for the 32-bit Mesa on 64-bit
-          systems. Used when {option}`driSupport32Bit` is set.
-        '';
-        apply = mesa: mesa.drivers or (throw "`mesa` package must have a `drivers` output.");
       };
 
       extraPackages = mkOption {
@@ -126,6 +97,7 @@ in
           :::
         '';
       };
+
       extraPackages32 = mkOption {
         type = types.listOf types.package;
         default = [];
@@ -181,6 +153,9 @@ in
     environment.sessionVariables.LD_LIBRARY_PATH = mkIf cfg.setLdLibraryPath
       ([ "/run/opengl-driver/lib" ] ++ optional cfg.driSupport32Bit "/run/opengl-driver-32/lib");
 
+    hardware.opengl.package = mkDefault pkgs.mesa.drivers;
+    hardware.opengl.package32 = mkDefault pkgs.pkgsi686Linux.mesa.drivers;
+
     boot.extraModulePackages = optional (elem "virtualbox" videoDrivers) kernelPackages.virtualboxGuestAdditions;
   };
 }