summaryrefslogtreecommitdiffstats
path: root/lib/tests/modules/prefix-module-argument.nix
blob: 2cb854341a22be5dac4a8648250f2798c69792b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{ lib, ... }:
{
  options.foo = lib.mkOption {
    type = lib.types.submodule { };
    default = { };
  };

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