summaryrefslogtreecommitdiffstats
path: root/lib/tests/modules/deferred-module-error.nix
blob: 2f74421b2da5a641817a3629f19d3fffe9765e0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ config, lib, ... }:
let
  inherit (lib)
    types
    mkOption
    evalModules
    ;
  inherit (types)
    deferredModule
    ;
in
{
  options = {
    deferred = mkOption {
      type = deferredModule;
    };
    result = mkOption {
      default = (evalModules { modules = [ config.deferred ]; }).config.result;
    };
  };
  config = {
    deferred =
      { ... }:
      # this should be an attrset, so this fails
      true;
  };
}