3 inherit (lib) types mkOption setDefaultModuleLocation;
4 inherit (types) deferredModule lazyAttrsOf submodule str raw enum;
8 # generic module, declaring submodules:
11 # where all nodes include the default
13 _file = "generic.nix";
14 options.nodes = mkOption {
15 type = lazyAttrsOf (submodule { imports = [ config.default ]; });
18 options.default = mkOption {
19 type = deferredModule;
22 Module that is included in all nodes.
28 _file = "default-1.nix";
29 default = { config, ... }: {
30 options.settingsDict = lib.mkOption { type = lazyAttrsOf str; default = {}; };
31 options.bottom = lib.mkOption { type = enum []; };
36 _file = "default-a-is-b.nix";
37 default = ./define-settingsDict-a-is-b.nix;
41 _file = "nodes-foo.nix";
42 nodes.foo.settingsDict.b = "beta";
46 _file = "the-file-that-contains-the-bad-config.nix";
47 default.bottom = "bogus";
51 _file = "nodes-foo-c-is-a.nix";
52 nodes.foo = { config, ... }: {
53 settingsDict.c = config.settingsDict.a;