summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2020-11-01 14:05:38 -0800
committerJonathan Ringer <jonringer@users.noreply.github.com>2020-11-01 19:59:06 -0800
commit613adb0e8809c51e02e6361c2e88068b6ec079bb (patch)
treedd7f2edb25c1af153e11bf6c88dcd47b1e74aef4
parent8be87d0f992fb43492345e85864540965faed0ee (diff)
downloadnixpkgs-613adb0e8809c51e02e6361c2e88068b6ec079bb.tar
nixpkgs-613adb0e8809c51e02e6361c2e88068b6ec079bb.tar.gz
nixpkgs-613adb0e8809c51e02e6361c2e88068b6ec079bb.tar.bz2
nixpkgs-613adb0e8809c51e02e6361c2e88068b6ec079bb.tar.lz
nixpkgs-613adb0e8809c51e02e6361c2e88068b6ec079bb.tar.xz
nixpkgs-613adb0e8809c51e02e6361c2e88068b6ec079bb.tar.zst
nixpkgs-613adb0e8809c51e02e6361c2e88068b6ec079bb.zip
kernel/linuxManualConfig: add variant metadata
-rw-r--r--pkgs/os-specific/linux/kernel/manual-config.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix
index 7a91705b617..961bdab12b5 100644
--- a/pkgs/os-specific/linux/kernel/manual-config.nix
+++ b/pkgs/os-specific/linux/kernel/manual-config.nix
@@ -34,6 +34,13 @@ in {
   randstructSeed ? "",
   # Use defaultMeta // extraMeta
   extraMeta ? {},
+
+  # for module compatibility
+  isXen      ? features.xen_dom0 or false,
+  isZen      ? false,
+  isLibre    ? false,
+  isHardened ? false,
+
   # Whether to utilize the controversial import-from-derivation feature to parse the config
   allowImportFromDerivation ? false,
   # ignored
@@ -86,6 +93,9 @@ let
       passthru = {
         inherit version modDirVersion config kernelPatches configfile
           moduleBuildDependencies stdenv;
+        inherit isXen isZen isHardened isLibre;
+        kernelOlder = stdenv.lib.versionOlder version;
+        kernelAtLeast = stdenv.lib.versionAtLeast version;
       };
 
       inherit src;