Skip to content
Discussion options

You must be logged in to vote

The error I keep getting is error: The option `stylix.cursor' does not exist which is strange since that option should never be reached due to the condition mkIfs or optionalAttr.

The

options.stylix.cursor = lib.mkIf false (throw "should never be evaluated");

lib.mkIf declaration causes the option to be declared:

options.stylix.cursor = {
  _type = "if";
  condition = false;
  content = «thunk»;
};

The Nixpkgs module system will just not evaluate and extract content when condition is false. However, the options.stylix.cursor is declared either way, resulting in your error.

You should entirely prevent declarations with something like:

lib.mkMerge [
  (
    lib.mkIf false {
      options.s…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aig77
Comment options

Answer selected by aig77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants