diff --git a/nix/postgres/default.nix b/nix/postgres/default.nix index e479c21..6190801 100644 --- a/nix/postgres/default.nix +++ b/nix/postgres/default.nix @@ -230,6 +230,24 @@ in ''; }; + depends_on = lib.mkOption { + description = "Extra process dependency relationships for `${name}-init` process."; + 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 = [ ]; @@ -290,6 +308,7 @@ in in { command = setupScript; + depends_on = config.depends_on; namespace = name; };