Refactor(inventory/manifest): move into seperate file
This commit is contained in:
42
lib/inventory/distributed-service/manifest/default.nix
Normal file
42
lib/inventory/distributed-service/manifest/default.nix
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkOption;
|
||||||
|
inherit (lib) types;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
name = mkOption {
|
||||||
|
description = ''
|
||||||
|
The name of the module
|
||||||
|
|
||||||
|
Mainly used to create an error context while evaluating.
|
||||||
|
This helps backtracking which module was included; And where an error came from originally.
|
||||||
|
'';
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
features = mkOption {
|
||||||
|
description = ''
|
||||||
|
Enable built-in features for the module
|
||||||
|
|
||||||
|
See the documentation for each feature:
|
||||||
|
- API
|
||||||
|
'';
|
||||||
|
type = types.submoduleWith {
|
||||||
|
modules = [
|
||||||
|
{
|
||||||
|
options.API = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
# This is read only, because we don't support turning it off yet
|
||||||
|
readOnly = true;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Enables automatic API schema conversion for the interface of this module.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -232,43 +232,7 @@ in
|
|||||||
description = "Meta information about this module itself";
|
description = "Meta information about this module itself";
|
||||||
type = submoduleWith {
|
type = submoduleWith {
|
||||||
modules = [
|
modules = [
|
||||||
{
|
./manifest/default.nix
|
||||||
options = {
|
|
||||||
name = mkOption {
|
|
||||||
description = ''
|
|
||||||
The name of the module
|
|
||||||
|
|
||||||
Mainly used to create an error context while evaluating.
|
|
||||||
This helps backtracking which module was included; And where an error came from originally.
|
|
||||||
'';
|
|
||||||
type = types.str;
|
|
||||||
};
|
|
||||||
features = mkOption {
|
|
||||||
description = ''
|
|
||||||
Enable built-in features for the module
|
|
||||||
|
|
||||||
See the documentation for each feature:
|
|
||||||
- API
|
|
||||||
'';
|
|
||||||
type = types.submoduleWith {
|
|
||||||
modules = [
|
|
||||||
{
|
|
||||||
options.API = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
# This is read only, because we don't support turning it off yet
|
|
||||||
readOnly = true;
|
|
||||||
default = true;
|
|
||||||
description = ''
|
|
||||||
Enables automatic API schema conversion for the interface of this module.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user