From 7200b458b5719eaf08c72eb7110b889f25b8e26f Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Tue, 9 Jul 2024 16:52:09 -0400 Subject: [PATCH] refactor(fmt): group outputs options --- nix/lib.nix | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/nix/lib.nix b/nix/lib.nix index 4e54892..a9078f4 100644 --- a/nix/lib.nix +++ b/nix/lib.nix @@ -28,27 +28,29 @@ default = "${service}.${name}"; type = lib.types.str; }; - outputs.defaultProcessSettings = lib.mkOption { - type = lib.types.deferredModule; - internal = true; - readOnly = true; - description = '' - Default settings for all processes under the ${service} service - ''; - default = { - namespace = lib.mkDefault config.namespace; + outputs = { + defaultProcessSettings = lib.mkOption { + type = lib.types.deferredModule; + internal = true; + readOnly = true; + description = '' + Default settings for all processes under the ${service} service + ''; + default = { + namespace = lib.mkDefault config.namespace; + }; }; - }; - outputs.settings = lib.mkOption { - type = lib.types.lazyAttrsOf lib.types.raw; - internal = true; - description = '' - process-compose settings for the processes under the ${service} service - ''; - apply = v: v // { - processes = lib.flip lib.mapAttrs v.processes (_: cfg: - { imports = [ config.outputs.defaultProcessSettings cfg ]; } - ); + settings = lib.mkOption { + type = lib.types.lazyAttrsOf lib.types.raw; + internal = true; + description = '' + process-compose settings for the processes under the ${service} service + ''; + apply = v: v // { + processes = lib.flip lib.mapAttrs v.processes (_: cfg: + { imports = [ config.outputs.defaultProcessSettings cfg ]; } + ); + }; }; }; };