-13
modularizer.nix
-13
modularizer.nix
···
8
8
description = "List of paths to import";
9
9
};
10
10
11
-
enableDefaultModules = lib.mkOption {
12
-
type = lib.types.bool;
13
-
default = true;
14
-
description = "Enable default modules";
15
-
};
16
-
17
11
modules = lib.mkOption {
18
12
# ./path/name/type.nix or ./path/name/type/default.nix
19
13
# --> becomes -->
···
140
134
in finalize;
141
135
};
142
136
143
-
};
144
-
145
-
config.modularizer = {
146
-
paths =
147
-
let
148
-
path = self + "/modules";
149
-
in lib.mkIf (cfg.enableDefaultModules && builtins.pathExists path) [ path ];
150
137
};
151
138
}