Files
nixpkgs/lib/tests/modules/option.nix
2026-04-03 10:53:47 +02:00

28 lines
525 B
Nix

{
config,
lib,
options,
...
}:
{
options = {
theOption = lib.mkOption {
type = lib.types.optionDeclaration;
};
anOption = config.theOption;
aBadOptionDef = lib.mkOption {
type = lib.types.optionDeclaration;
description = ''
This option is perfectly fine, but will have a bad definition.
'';
};
};
config = {
theOption = lib.mkOption {
type = lib.types.int;
};
anOption = 10;
aBadOptionDef = options.theOption; # Not a declaration
};
}