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 statemembers— Commands that operate on component membersstate— Commands that operate on deployment state
Options:
-
-v,--verboseDefault value:
false -
--color <COLOR>Default value:
autoPossible values:
auto,always,never -
--interactiveDefault value:
false -
--no-interactiveDefault value:
false -
--show-traceDefault value:
false -
--override-input <INPUT_ATTR_PATH>— Temporarily use a different flake input -
--file <PATH>— Use a Nix file instead of flake ornixops4.nixdiscovery. The file must evaluate to a nixops4 component, e.g. vianixops4.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 resourceDefault 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”)