mirror of
https://github.com/juspay/services-flake.git
synced 2024-09-11 04:15:36 +03:00
refactor(fmt): group outputs options
This commit is contained in:
parent
a6ec8b3f61
commit
7200b458b5
42
nix/lib.nix
42
nix/lib.nix
@ -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 ]; }
|
);
|
||||||
);
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user