Add debug option (dumps YAML)

This commit is contained in:
Sridhar Ratnakumar 2023-06-09 16:06:11 -04:00
parent 230955df9e
commit 00389cd1cd
2 changed files with 10 additions and 1 deletions

View File

@ -24,6 +24,13 @@ in
The final package that will run 'process-compose up' for this configuration.
'';
};
debug = mkOption {
type = types.bool;
default = false;
description = ''
Whether to dump the process-compose YAML file at start.
'';
};
};
config.outputs.package =
@ -31,6 +38,7 @@ in
inherit name;
runtimeInputs = [ config.package ];
text = ''
${if config.debug then "cat ${config.outputs.settingsYaml}" else ""}
process-compose up \
-f ${config.outputs.settingsYaml} \
${config.outputs.upCommandArgs} \

View File

@ -15,9 +15,10 @@
perSystem = { pkgs, lib, ... }: {
# This adds a `self.packages.default`
process-compose."default" = {
debug = true;
tui = false;
settings = {
environment = [
environment = [
"DATAFILE=data.sqlite"
];
processes = {