core/lib/tests/modules/declare-attrsOf.nix

14 lines
375 B
Nix
Raw Normal View History

2024-05-01 22:14:04 +00:00
{ lib, ... }:
let
2024-06-30 08:16:52 +00:00
deathtrapArgs = lib.mapAttrs (
k: _: throw "The module system is too strict, accessing an unused option's ${k} mkOption-attribute."
) (lib.functionArgs lib.mkOption);
2024-05-01 22:14:04 +00:00
in
{
options.value = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
2024-06-30 08:16:52 +00:00
default = { };
2024-05-01 22:14:04 +00:00
};
options.testing-laziness-so-don't-read-me = lib.mkOption deathtrapArgs;
}