diff --git a/lib/modules.nix b/lib/modules.nix index c3c903c1dfa..629e7fb13fe 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -591,6 +591,7 @@ rec { { options, ... }: { options = setAttrByPath optionName (mkOption { visible = false; + apply = x: throw "The option `${showOption optionName}' can no longer be used since it's been removed. ${replacementInstructions}"; }); config.warnings = let opt = getAttrFromPath optionName options; in