about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorJoachim F <joachifm@users.noreply.github.com>2019-01-25 14:13:45 +0000
committerGitHub <noreply@github.com>2019-01-25 14:13:45 +0000
commitf6414428ede349733f2326f3a000cff9ed570d77 (patch)
tree9ce876a53ecff3dbfa6b64207e388a4ac410cc70 /nixos
parentf9e5b73178e2b99af48492d0b8e73a1d2956beb6 (diff)
parentab070d1b0b424a49322d70a75b21c4f21e10637a (diff)
downloadnixlib-f6414428ede349733f2326f3a000cff9ed570d77.tar
nixlib-f6414428ede349733f2326f3a000cff9ed570d77.tar.gz
nixlib-f6414428ede349733f2326f3a000cff9ed570d77.tar.bz2
nixlib-f6414428ede349733f2326f3a000cff9ed570d77.tar.lz
nixlib-f6414428ede349733f2326f3a000cff9ed570d77.tar.xz
nixlib-f6414428ede349733f2326f3a000cff9ed570d77.tar.zst
nixlib-f6414428ede349733f2326f3a000cff9ed570d77.zip
Merge pull request #53511 from joachifm/kernel-32bit-emu-feature-flag
linux: flag to indicate 32bit emulation support
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/hardware/opengl.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/nixos/modules/hardware/opengl.nix b/nixos/modules/hardware/opengl.nix
index 48e0072e0892..6b7b8069fd44 100644
--- a/nixos/modules/hardware/opengl.nix
+++ b/nixos/modules/hardware/opengl.nix
@@ -124,10 +124,14 @@ in
 
   config = mkIf cfg.enable {
 
-    assertions = lib.singleton {
-      assertion = cfg.driSupport32Bit -> pkgs.stdenv.isx86_64;
-      message = "Option driSupport32Bit only makes sense on a 64-bit system.";
-    };
+    assertions = [
+      { assertion = cfg.driSupport32Bit -> pkgs.stdenv.isx86_64;
+        message = "Option driSupport32Bit only makes sense on a 64-bit system.";
+      }
+      { assertion = cfg.driSupport32Bit -> (config.boot.kernelPackages.kernel.features.ia32Emulation or false);
+        message = "Option driSupport32Bit requires a kernel that supports 32bit emulation";
+      }
+    ];
 
     systemd.tmpfiles.rules = [
       "L+ /run/opengl-driver - - - - ${package}"