Skip to content

Commit 00389cd

Browse files
committed
Add debug option (dumps YAML)
1 parent 230955d commit 00389cd

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

nix/process-compose/default.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,21 @@ in
2424
The final package that will run 'process-compose up' for this configuration.
2525
'';
2626
};
27+
debug = mkOption {
28+
type = types.bool;
29+
default = false;
30+
description = ''
31+
Whether to dump the process-compose YAML file at start.
32+
'';
33+
};
2734
};
2835

2936
config.outputs.package =
3037
pkgs.writeShellApplication {
3138
inherit name;
3239
runtimeInputs = [ config.package ];
3340
text = ''
41+
${if config.debug then "cat ${config.outputs.settingsYaml}" else ""}
3442
process-compose up \
3543
-f ${config.outputs.settingsYaml} \
3644
${config.outputs.upCommandArgs} \

test/flake.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
perSystem = { pkgs, lib, ... }: {
1616
# This adds a `self.packages.default`
1717
process-compose."default" = {
18+
debug = true;
1819
tui = false;
1920
settings = {
20-
environment = [
21+
environment = [
2122
"DATAFILE=data.sqlite"
2223
];
2324
processes = {

0 commit comments

Comments
 (0)