We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab2a1f7 commit d85298fCopy full SHA for d85298f
lib/options.nix
@@ -69,6 +69,11 @@ in rec {
69
allowStr = addTypeToOption str;
70
71
noDefault = option: builtins.removeAttrs option ["default"];
72
+ # This is a more convenient way to handle the presence of a default value in the option based on the condition (#18)
73
+ noNullDefault = option:
74
+ if option.default == null
75
+ then builtins.removeAttrs option ["default"]
76
+ else option;
77
readOnly = option: option // {readOnly = true;};
78
79
apply = option: apply: option // {inherit apply;};
0 commit comments