feat(inventory/instances): preserve settings modifiers close at source
This commit is contained in:
@@ -204,9 +204,8 @@ in
|
|||||||
elemType = submoduleWith {
|
elemType = submoduleWith {
|
||||||
modules = [
|
modules = [
|
||||||
(m: {
|
(m: {
|
||||||
# TODO: Move the deferred module type into inventory interface ?
|
|
||||||
options.settings = mkOption {
|
options.settings = mkOption {
|
||||||
type = types.deferredModule;
|
type = types.raw;
|
||||||
description = "Settings of '${name}-machine': ${m.name}.";
|
description = "Settings of '${name}-machine': ${m.name}.";
|
||||||
default = { };
|
default = { };
|
||||||
};
|
};
|
||||||
@@ -221,7 +220,7 @@ in
|
|||||||
# options._settingsViaTags = mkOption { };
|
# options._settingsViaTags = mkOption { };
|
||||||
# A deferred module that combines _settingsViaTags with _settings
|
# A deferred module that combines _settingsViaTags with _settings
|
||||||
options.settings = mkOption {
|
options.settings = mkOption {
|
||||||
type = types.deferredModule;
|
type = types.raw;
|
||||||
description = "Settings of 'role': ${name}";
|
description = "Settings of 'role': ${name}";
|
||||||
default = { };
|
default = { };
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ in
|
|||||||
default = { };
|
default = { };
|
||||||
# Dont transform the value with `types.deferredModule` here. We need to keep it json serializable
|
# Dont transform the value with `types.deferredModule` here. We need to keep it json serializable
|
||||||
# TODO: We need a custom serializer for deferredModule
|
# TODO: We need a custom serializer for deferredModule
|
||||||
type = types.attrsOf types.raw;
|
type = types.deferredModule;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -325,7 +325,7 @@ in
|
|||||||
types.submodule {
|
types.submodule {
|
||||||
options.settings = lib.mkOption {
|
options.settings = lib.mkOption {
|
||||||
default = { };
|
default = { };
|
||||||
type = types.attrsOf types.raw;
|
type = types.deferredModule;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -333,7 +333,7 @@ in
|
|||||||
};
|
};
|
||||||
settings = lib.mkOption {
|
settings = lib.mkOption {
|
||||||
default = { };
|
default = { };
|
||||||
type = types.attrsOf types.raw;
|
type = types.deferredModule;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user