refactor(fmt): group outputs options

This commit is contained in:
Sridhar Ratnakumar 2024-07-09 16:52:09 -04:00
parent a6ec8b3f61
commit 7200b458b5
No known key found for this signature in database

View File

@ -28,27 +28,29 @@
default = "${service}.${name}"; default = "${service}.${name}";
type = lib.types.str; type = lib.types.str;
}; };
outputs.defaultProcessSettings = lib.mkOption { outputs = {
type = lib.types.deferredModule; defaultProcessSettings = lib.mkOption {
internal = true; type = lib.types.deferredModule;
readOnly = true; internal = true;
description = '' readOnly = true;
Default settings for all processes under the ${service} service description = ''
''; Default settings for all processes under the ${service} service
default = { '';
namespace = lib.mkDefault config.namespace; default = {
namespace = lib.mkDefault config.namespace;
};
}; };
}; settings = lib.mkOption {
outputs.settings = lib.mkOption { type = lib.types.lazyAttrsOf lib.types.raw;
type = lib.types.lazyAttrsOf lib.types.raw; internal = true;
internal = true; description = ''
description = '' process-compose settings for the processes under the ${service} service
process-compose settings for the processes under the ${service} service '';
''; apply = v: v // {
apply = v: v // { processes = lib.flip lib.mapAttrs v.processes (_: cfg:
processes = lib.flip lib.mapAttrs v.processes (_: cfg: { imports = [ config.outputs.defaultProcessSettings cfg ]; }
{ imports = [ config.outputs.defaultProcessSettings cfg ]; } );
); };
}; };
}; };
}; };