Skip to content

Commit

Permalink
Added option depends_on which will be useful to append extra depends_…
Browse files Browse the repository at this point in the history
…on configuration to the <name>-init process.
  • Loading branch information
rsrohitsingh682 committed Dec 26, 2023
1 parent d6b73e4 commit 44e8eec
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions nix/postgres/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,24 @@ in
'';
};

depends_on = lib.mkOption {
description = "Extra process dependency relationships";
type = types.nullOr (types.attrsOf (types.submodule {
options = {
condition = lib.mkOption {
type = types.enum [
"process_completed"
"process_completed_successfully"
"process_healthy"
"process_started"
];
example = "process_healthy";
};
};
}));
default = null;
};

initialDumps = lib.mkOption {
type = types.listOf types.path;
default = [ ];
Expand Down Expand Up @@ -290,6 +308,7 @@ in
in
{
command = setupScript;
depends_on = config.depends_on;
namespace = name;
};

Expand Down

0 comments on commit 44e8eec

Please sign in to comment.