Inventory: rename imports to extraModules
This commit is contained in:
committed by
hsjobeki
parent
c21a265e21
commit
55a25e69e2
@@ -33,13 +33,15 @@ let
|
|||||||
type = types.attrsOf types.anything;
|
type = types.attrsOf types.anything;
|
||||||
};
|
};
|
||||||
|
|
||||||
importsOption = lib.mkOption {
|
extraModulesOption = lib.mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
List of imported '.nix' files.
|
List of imported '.nix' expressions.
|
||||||
|
|
||||||
Each filename must be a string and is interpreted relative to the 'directory' passed to buildClan.
|
Strings are interpreted relative to the 'directory' passed to buildClan.
|
||||||
The import only happens if the machine is part of the service or role.
|
The import only happens if the machine is part of the service or role.
|
||||||
|
|
||||||
|
Other types are passed through to the nixos configuration.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
To import the `special.nix` file
|
To import the `special.nix` file
|
||||||
@@ -55,7 +57,7 @@ let
|
|||||||
|
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
imports = [ "modules/special.nix" ];
|
extraModules = [ "modules/special.nix" ];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -118,13 +120,13 @@ in
|
|||||||
{ name, ... }:
|
{ name, ... }:
|
||||||
{
|
{
|
||||||
options.meta = metaOptionsWith name;
|
options.meta = metaOptionsWith name;
|
||||||
options.imports = importsOption;
|
options.extraModules = extraModulesOption;
|
||||||
options.config = moduleConfig;
|
options.config = moduleConfig;
|
||||||
options.machines = lib.mkOption {
|
options.machines = lib.mkOption {
|
||||||
default = { };
|
default = { };
|
||||||
type = types.attrsOf (
|
type = types.attrsOf (
|
||||||
types.submodule {
|
types.submodule {
|
||||||
options.imports = importsOption;
|
options.extraModules = extraModulesOption;
|
||||||
options.config = moduleConfig;
|
options.config = moduleConfig;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -143,7 +145,7 @@ in
|
|||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
};
|
};
|
||||||
options.config = moduleConfig;
|
options.config = moduleConfig;
|
||||||
options.imports = importsOption;
|
options.extraModules = extraModulesOption;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user