1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-21 17:01:10 +03:00
nixpkgs/lib/tests/modules/freeform-nested.nix

15 lines
368 B
Nix
Raw Normal View History

{ lib, ... }:
let
deathtrapArgs = lib.mapAttrs (
k: _: throw "The module system is too strict, accessing an unused option's ${k} mkOption-attribute."
) (lib.functionArgs lib.mkOption);
in
{
options.nest.foo = lib.mkOption {
type = lib.types.bool;
default = false;
};
options.nest.unused = lib.mkOption deathtrapArgs;
config.nest.bar = "bar";
}