Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

infra.services

14 options

infra.services

Service registry. Infra modules register here; firewall, Caddy, and docs are derived automatically.

Type: attribute set of (submodule)

Default:

{ }

Example:

{
  myapp = {
    port = 8080;
    description = "Example web app";
    category = "workload";
  };
}

Declared by: nix/modules/infra/services.nix


infra.services.<name>.caddy.enable

Also reverse-proxy the primary port through the local Caddy.

Type: boolean

Default:

true

Declared by: nix/modules/infra/services.nix


infra.services.<name>.caddy.hostname

FQDN prefix under the internal domain (.<fleet.settings.domain.internal>). Defaults to attr name. Null = path-only under host FQDN.

Type: null or string

Default:

"‹name›"

Declared by: nix/modules/infra/services.nix


infra.services.<name>.caddy.path

URL path. ‘/’ = own vhost. ‘/foo’ = path under the service hostname on the internal domain.

Type: string

Default:

"/"

Declared by: nix/modules/infra/services.nix


infra.services.<name>.category

Service category (e.g., platform, observability, workload, network).

Type: string

Default:

"uncategorized"

Declared by: nix/modules/infra/services.nix


infra.services.<name>.description

Human-readable description. Shows up in the service catalog.

Type: string

Default:

""

Declared by: nix/modules/infra/services.nix


infra.services.<name>.extraPorts

Additional ports to open in the firewall (e.g., HTTPS, metrics, gRPC).

Type: list of (submodule)

Default:

[ ]

Declared by: nix/modules/infra/services.nix


infra.services.<name>.extraPorts.*.name

Short label for this port, distinguishing it from the service’s other ports. Consumed by generated env files and the service catalog: a service with several ports otherwise exports a single ambiguous PORT, which is useless to anyone wiring an application against it (RabbitMQ’s AMQP 5672 and management 15672 are the obvious case).

null keeps the port firewall-only and unnamed — fine for a metrics or gRPC port nothing external configures against.

Type: null or string

Default:

null

Example:

"mgmt"

Declared by: nix/modules/infra/services.nix


infra.services.<name>.extraPorts.*.port

Additional port to open in the firewall.

Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Default: none (required when its feature is enabled)

Declared by: nix/modules/infra/services.nix


infra.services.<name>.extraPorts.*.protocol

Protocol hint for documentation (e.g., http, https, grpc, tcp).

Type: string

Default:

"tcp"

Declared by: nix/modules/infra/services.nix


infra.services.<name>.extraPorts.*.ui

Whether this port serves a UI (for catalog display).

Type: boolean

Default:

false

Declared by: nix/modules/infra/services.nix


infra.services.<name>.host

Upstream host for Caddy. Defaults to localhost.

Type: string

Default:

"127.0.0.1"

Declared by: nix/modules/infra/services.nix


infra.services.<name>.port

Primary port. Opened in firewall; proxied by Caddy when caddy.enable = true.

Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Default: none (required when its feature is enabled)

Declared by: nix/modules/infra/services.nix


infra.services.<name>.tags

Freeform tags for filtering (e.g., [ “internal” “docker” ]).

Type: list of string

Default:

[ ]

Declared by: nix/modules/infra/services.nix