mirror of
https://github.com/Platonic-Systems/process-compose-flake.git
synced 2024-10-26 22:38:39 +03:00
api: consistently use 'outputs' submodule
This commit is contained in:
parent
248d02a4ff
commit
f2ec5b572a
@ -17,24 +17,27 @@ in
|
||||
default = null;
|
||||
description = "Enable or disable the TUI for the application.";
|
||||
};
|
||||
extraCliArgs =
|
||||
outputs.upCommandArgs =
|
||||
let
|
||||
cliArgsAttr = {
|
||||
port = "-p ${toString config.port}";
|
||||
tui = "-t=${lib.boolToString config.tui}";
|
||||
};
|
||||
getCliArgs =
|
||||
args =
|
||||
lib.mapAttrsToList
|
||||
(opt: arg: lib.optionalString (config.${opt} != null) arg)
|
||||
cliArgsAttr;
|
||||
in
|
||||
mkOption {
|
||||
type = types.str;
|
||||
default = lib.concatStringsSep " " getCliArgs;
|
||||
default = lib.concatStringsSep " " args;
|
||||
internal = true;
|
||||
readOnly = true;
|
||||
description = ''
|
||||
Extra command-line arguments to pass to process-compose.
|
||||
Additional CLI arguments to pass to 'process-compose up'.
|
||||
|
||||
Note: `-f` option is always included, pointing to generated config.
|
||||
And is thus not handled by this option.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
@ -32,8 +32,8 @@ in
|
||||
runtimeInputs = [ config.package ];
|
||||
text = ''
|
||||
process-compose up \
|
||||
-f ${config.settingsYaml} \
|
||||
${config.extraCliArgs} \
|
||||
-f ${config.outputs.settingsYaml} \
|
||||
${config.outputs.upCommandArgs} \
|
||||
"$@"
|
||||
'';
|
||||
};
|
||||
|
@ -26,13 +26,13 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
settingsYaml = mkOption {
|
||||
outputs.settingsYaml = mkOption {
|
||||
type = types.attrsOf types.raw;
|
||||
internal = true;
|
||||
};
|
||||
};
|
||||
|
||||
config.settingsYaml =
|
||||
config.outputs.settingsYaml =
|
||||
let
|
||||
toYAMLFile =
|
||||
attrs:
|
||||
|
Loading…
Reference in New Issue
Block a user