about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-04-29 18:33:07 +0000
committerAlyssa Ross <hi@alyssa.is>2023-05-01 10:23:42 +0000
commit12e08bd339ef5dbaabb4c892d0c7637c96bafe18 (patch)
tree64dc4f90f4e8d9ff6707b9693a7a01f8fd4d2dee /lib
parent7c612723b8e0311da0d8d0db172b2142614664f0 (diff)
lib.kernel.unset: init
Previously, there was no way to unset an option when overriding a
kernel, apart from writing out the attrset yourself.  Now it's
possible with lib.mkForce lib.kernel.unset.  It's important to be able
to do this, because setting an option in the override may cause other
options to become unused, which would fail the config build unless
they were overridden too.
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/kernel.nix b/lib/kernel.nix
index ffcbc268b76cf..33da9663a8edf 100644
--- a/lib/kernel.nix
+++ b/lib/kernel.nix
@@ -8,9 +8,10 @@ with lib;
   option = x:
       x // { optional = true; };
 
-  yes      = { tristate    = "y"; optional = false; };
-  no       = { tristate    = "n"; optional = false; };
-  module   = { tristate    = "m"; optional = false; };
+  yes      = { tristate    = "y";  optional = false; };
+  no       = { tristate    = "n";  optional = false; };
+  module   = { tristate    = "m";  optional = false; };
+  unset    = { tristate    = null; optional = false; };
   freeform = x: { freeform = x; optional = false; };
 
   /*