From 12e08bd339ef5dbaabb4c892d0c7637c96bafe18 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 29 Apr 2023 18:33:07 +0000 Subject: [PATCH] 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. --- lib/kernel.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/kernel.nix b/lib/kernel.nix index ffcbc268b76c..33da9663a8ed 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; }; /*