StackPanel

services

Configuration options for stackpanel.services

Services Options

serviceModules

Additional modules to extend service configuration options.

This allows other modules (like process-compose) to inject per-service options into every service definition. Works identically to appModules.

Example: The process-compose module injects process-compose.namespace, process-compose.readiness_probe, etc. into every service.

PropertyValue
Typelist of module
Default[ ]

services

Development services managed by process-compose.

Each service is a long-running process (database, cache, object store, etc.) that gets a process-compose entry under the "services" namespace.

Services can be defined directly here or via the stackpanel.globalServices convenience layer (which maps into this option internally).

The process-compose module injects additional per-service options (namespace, readiness_probe, availability, depends_on) via serviceModules.

PropertyValue
Typeattribute set of (submodule)
Default{ }

Example:

{
  postgres = {
    enable = true;
    displayName = "PostgreSQL";
    command = "${postgresStartScript}/bin/postgres-start";
    port = 5432;
    autoStart = true;
    env = {
      DATABASE_URL = "postgresql://localhost:5432/mydb";
    };
    packages = [ pkgs.postgresql_17 ];
  };
  redis = {
    enable = true;
    displayName = "Redis";
    command = "${redisStartScript}/bin/redis-start";
    port = 6379;
  };
}

services.<name>.autoStart

Whether to auto-start this service when dev is run. If false, the service is visible in the process-compose TUI but must be started manually.

PropertyValue
Typeboolean
Defaulttrue

services.<name>.command

Command to start the service in foreground mode. This should be an idempotent script that initializes data directories if needed, then exec's the service binary. Process-compose manages the lifecycle (restart, shutdown).

PropertyValue
Typestring
Defaultnone

Example:

"${postgresStartScript}/bin/postgres-start"


services.<name>.dataDir

Path where this service stores its data. Typically under .stack/state/services//.

PropertyValue
Typenull or string
Defaultnull

services.<name>.description

Short description of the service.

PropertyValue
Typestring
Default""

Example:

"Relational database for application data"


services.<name>.displayName

Human-readable display name for the service.

PropertyValue
Typestring
Default"‹name›"

Example:

"PostgreSQL"


services.<name>.enable

Whether to enable this service.

PropertyValue
Typeboolean
Defaultfalse

Example:

true


services.<name>.env

Environment variables contributed by this service to the devshell. These are available to all processes and the interactive shell.

PropertyValue
Typeattribute set of string
Default{ }

Example:

{
  DATABASE_URL = "postgresql://localhost:5432/mydb";
  PGHOST = "/tmp/postgres";
}

services.<name>.packages

Packages added to the devshell PATH when this service is enabled. Typically includes the service binary and CLI tools (psql, redis-cli, etc.).

PropertyValue
Typelist of package
Default[ ]

services.<name>.port

Primary port for this service. Optional - some services (like file watchers) don't use ports.

PropertyValue
Typenull or 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Defaultnull

Example:

5432


services.<name>.shellHook

Shell hook code run during devshell initialization. Used for environment setup that can't be expressed as static env vars.

PropertyValue
Typestrings concatenated with "\n"
Default""

On this page