core/lib/tests/modules/raw.nix

27 lines
642 B
Nix
Raw Normal View History

2024-06-30 08:16:52 +00:00
{ lib, config, ... }:
{
2024-05-01 22:14:04 +00:00
options = {
2024-06-30 08:16:52 +00:00
processedToplevel = lib.mkOption { type = lib.types.raw; };
unprocessedNesting = lib.mkOption { type = lib.types.raw; };
multiple = lib.mkOption { type = lib.types.raw; };
priorities = lib.mkOption { type = lib.types.raw; };
2024-05-01 22:14:04 +00:00
unprocessedNestingEvaluates = lib.mkOption {
default = builtins.tryEval config.unprocessedNesting;
};
};
config = {
processedToplevel = lib.mkIf true 10;
unprocessedNesting.foo = throw "foo";
multiple = lib.mkMerge [
"foo"
"foo"
];
priorities = lib.mkMerge [
"foo"
(lib.mkForce "bar")
];
};
}