Skip to content

Commit f2ec5b5

Browse files
committed
api: consistently use 'outputs' submodule
1 parent 248d02a commit f2ec5b5

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

nix/process-compose/cli.nix

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,27 @@ in
1717
default = null;
1818
description = "Enable or disable the TUI for the application.";
1919
};
20-
extraCliArgs =
20+
outputs.upCommandArgs =
2121
let
2222
cliArgsAttr = {
2323
port = "-p ${toString config.port}";
2424
tui = "-t=${lib.boolToString config.tui}";
2525
};
26-
getCliArgs =
26+
args =
2727
lib.mapAttrsToList
2828
(opt: arg: lib.optionalString (config.${opt} != null) arg)
2929
cliArgsAttr;
3030
in
3131
mkOption {
3232
type = types.str;
33-
default = lib.concatStringsSep " " getCliArgs;
33+
default = lib.concatStringsSep " " args;
3434
internal = true;
3535
readOnly = true;
3636
description = ''
37-
Extra command-line arguments to pass to process-compose.
37+
Additional CLI arguments to pass to 'process-compose up'.
38+
39+
Note: `-f` option is always included, pointing to generated config.
40+
And is thus not handled by this option.
3841
'';
3942
};
4043
};

nix/process-compose/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ in
3232
runtimeInputs = [ config.package ];
3333
text = ''
3434
process-compose up \
35-
-f ${config.settingsYaml} \
36-
${config.extraCliArgs} \
35+
-f ${config.outputs.settingsYaml} \
36+
${config.outputs.upCommandArgs} \
3737
"$@"
3838
'';
3939
};

nix/process-compose/settings.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ in
2626
'';
2727
};
2828

29-
settingsYaml = mkOption {
29+
outputs.settingsYaml = mkOption {
3030
type = types.attrsOf types.raw;
3131
internal = true;
3232
};
3333
};
3434

35-
config.settingsYaml =
35+
config.outputs.settingsYaml =
3636
let
3737
toYAMLFile =
3838
attrs:

0 commit comments

Comments
 (0)