nixpkgs/lib/tests/modules/prefix-module-argument.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
279 B
Nix
Raw Normal View History

{ lib, ... }:
{
options.foo = lib.mkOption {
type = lib.types.submodule { };
default = { };
};
config = {
foo =
{ _prefix, ... }:
assert _prefix == [ "foo" ];
{
options.ok = lib.mkOption { };
config.ok = true;
};
};
}