Module Options
NixOps4 deployments are composable using the Module System.
Modules loaded into mkDeployment can define values for these options, as well as any custom options
and options provided by other imported modules.
Pay attention to examples in the parent options
The NixOps4 modules use a patterns you may not be familiar with as a NixOS user or contributor: imports
into submodule
, and the deferredModule
type.
These enable the "building with bricks" experience instead of a "filling in a form" experience.
This means that the options below only outline the low level interface, whereas often you'll use imports
and then support other options.
Options
providers
The resource providers to use.
Resource providers are the executables that implement the operations on resources.
While provider information can be provided directly in the resource, this indirection allows for the same provider to be used for multiple resources conveniently.
It also allows for expressions to extract just the providers from a deployment configuration.
Type: lazy attribute set of (submodule)
Default:
{ }
Example:
{
local = inputs.nixops4.modules.nixops4Provider.local;
foo = inputs.nixops4-resources-foo.modules.nixops4Provider.default;
}
Declared by:
providers.<name>.args
Any command line arguments to pass to the executable.
Type: list of string
Default:
[ ]
Declared by:
providers.<name>.executable
The path to the executable that implements the resource operations.
Type: string
Declared by:
providers.<name>.resourceTypes
The types of resources that this provider can create.
The purpose of the resourceTypes
option is to provide the information necessary to create the providers
module argument.
The attribute name under resourceTypes
is the resource type, and gives rise to providers.<provider>.<resourceType>
.
Type: lazy attribute set of (submodule)
Declared by:
providers.<name>.resourceTypes.<name>.inputs
A module that declares the inputs to the resource using its options.
Type: module
Declared by:
providers.<name>.resourceTypes.<name>.outputs
A module that declares the outputs of the resource using its options.
Type: module
Declared by:
providers.<name>.resourceTypes.<name>.provider.args
Value to be used for resources.<name>.provider.args
.
Type: list of string
Default: inherited from provider
Declared by:
providers.<name>.resourceTypes.<name>.provider.executable
Value to be used for resources.<name>.provider.executable
.
Type: string
Default: inherited from provider
Declared by:
providers.<name>.resourceTypes.<name>.provider.type
Value to be used for resources.<name>.provider.type
.
Type: string
Default: inherited from provider
Declared by:
providers.<name>.resourceTypes.<name>.type
The type of resource to create. Most resource providers will have some fixed set of resource types. This selects one of them.
We suggest to set (override) this only if absolutely necessary for compatibility with earlier versions of a resource.
Type: string
Default: inherited attribute name
Declared by:
providers.<name>.type
The type of communication to use with the resource provider executable.
Type: string
Default:
"stdio"
Declared by:
resources
The resources to deploy.
Type: lazy attribute set of (submodule)
Default:
{ }
Declared by:
resources.<name>.inputs
The inputs to the resource.
These parameters primarily control the configuration of the resource. They are set by you (a module author or configuration author) and are passed to the resource provider executable.
Type: submodule
Declared by:
resources.<name>.outputs
The outputs of the resource.
These follow from the real world existence of the resource. They are set by NixOps, which in turn gets this information from resource providers.
Type: submodule
Declared by:
resources.<name>.provider.args
Any command line arguments to pass to the executable.
Type: list of (string or (string or absolute path or signed integer) convertible to it)
Default:
[ ]
Declared by:
resources.<name>.provider.executable
The path to the executable that implements the resource operations.
Type: string
Declared by:
resources.<name>.provider.type
The type of communication to use with the resource provider executable.
Type: value “stdio” (singular enum)
Default:
"stdio"
Declared by:
resources.<name>.resourceType
The type of resource to create. Most resource providers will have some fixed set of resource types.
Type: string
Declared by:
resources.<name>.type
A resource type from the providers
module argument.
Type: raw value
Example:
providers.local.file
Declared by: