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

Command-Line Help for nixops4

This document contains the help content for the nixops4 command-line program.

Command Overview:

nixops4

The nixops4 command-line tool

Usage: nixops4 [OPTIONS] <COMMAND>

Subcommands:
  • apply — Apply changes so that the resources are in the desired state
  • members — Commands that operate on component members
  • state — Commands that operate on deployment state
Options:
  • -v, --verbose

    Default value: false

  • --color <COLOR>

    Default value: auto

    Possible values: auto, always, never

  • --interactive

    Default value: false

  • --no-interactive

    Default value: false

  • --show-trace

    Default value: false

  • --override-input <INPUT_ATTR_PATH> — Temporarily use a different flake input

  • --file <PATH> — Use a Nix file instead of flake or nixops4.nix discovery. The file must evaluate to a nixops4 component, e.g. via nixops4.lib.mkRoot

nixops4 apply

Apply changes so that the resources are in the desired state.

When paths are specified, all members below those paths are applied, as well as any resources they transitively depend on.

Usage: nixops4 apply [PATHS]...

Arguments:
  • <PATHS> — Component paths to apply, including nested members and transitive dependencies (empty = entire root)

nixops4 members

Commands that operate on component members

Usage: nixops4 members <COMMAND>

Subcommands:
  • list — List members at a component path (default: root)

nixops4 members list

List members at a component path (default: root).

This is a read-only command that does not create or modify resources. If the member set depends on a resource output (a structural dependency), the command fails instead of showing incomplete results.

Usage: nixops4 members list [PATH]

Arguments:
  • <PATH> — Component path (dot-separated, e.g., “production.database”). Must resolve to a composite (deployment), not a resource

    Default value: ``

nixops4 state

Commands that operate on deployment state

Usage: nixops4 state <COMMAND>

Subcommands:
  • dump — Dump the current state stored in a state-providing resource as JSON

nixops4 state dump

Dump the current state stored in a state-providing resource as JSON.

This is a read-only command that does not create or modify resources. If the resource path cannot be resolved without applying other resources (e.g., it depends on another resource’s output), the command fails.

Plumbing: the output is the raw state contents, which may contain unencrypted secrets. Do not paste it into bug reports or send it over untrusted channels without redacting first.

Usage: nixops4 state dump <PATH>

Arguments:
  • <PATH> — Path to a state-providing resource (dot-separated, e.g., “myDeployment.state”)