git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #53511 from joachifm/kernel-32bit-emu-feature-flag

linux: flag to indicate 32bit emulation support

commitf6414428ede349733f2326f3a000cff9ed570d77 authorJoachim F <joachifm@users.noreply.github.com> dateFri 25 Jan 2019, 14:13 (8 years ago) parentf9e5b73ab070d1
3 files changed+10−4
nixos/modules/hardware/opengl.nix+8−4 pkgs/os-specific/linux/kernel/generic.nix+1 pkgs/top-level/all-packages.nix+1
nixos/modules/hardware/opengl.nix+8−4
@@ -124,10 +124,14 @@ in
124124
125125 config = mkIf cfg.enable {
126126
127− assertions = lib.singleton {
128− assertion = cfg.driSupport32Bit -> pkgs.stdenv.isx86_64;
129− message = "Option driSupport32Bit only makes sense on a 64-bit system.";
130− };
127+ assertions = [
128+ { assertion = cfg.driSupport32Bit -> pkgs.stdenv.isx86_64;
129+ message = "Option driSupport32Bit only makes sense on a 64-bit system.";
130+ }
131+ { assertion = cfg.driSupport32Bit -> (config.boot.kernelPackages.kernel.features.ia32Emulation or false);
132+ message = "Option driSupport32Bit requires a kernel that supports 32bit emulation";
133+ }
134+ ];
131135
132136 systemd.tmpfiles.rules = [
133137 "L+ /run/opengl-driver - - - - ${package}"
pkgs/os-specific/linux/kernel/generic.nix+1
@@ -65,6 +65,7 @@ let
6565 netfilterRPFilter = true;
6666 grsecurity = false;
6767 xen_dom0 = false;
68+ ia32Emulation = true;
6869 } // features) kernelPatches;
6970
7071 intermediateNixConfig = import ./common-config.nix {
pkgs/top-level/all-packages.nix+1
@@ -14870,6 +14870,7 @@ in
1487014870
1487114871 # Hardened linux
1487214872 hardenedLinuxPackagesFor = kernel: linuxPackagesFor (kernel.override {
14873+ features.ia32Emulation = false;
1487314874 extraConfig = import ../os-specific/linux/kernel/hardened-config.nix {
1487414875 inherit stdenv;
1487514876 inherit (kernel) version;