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