Library
The flake comes with a lib attribute, e.g. inputs.nixops4.lib.
It provides the main entrypoint, inputs.nixops4.lib.mkDeployment.
evalDeployment
Evaluate a deployment configuration. This is a building block for mkDeployment, which is the usual entry point for defining deployments.
Type
EvalModulesArguments -> NixOpsArguments -> Configuration
Inputs
-
Arguments for evalModules - i.e. the Module System. These are adjusted to include NixOps-specific arguments.
-
Arguments provided by NixOps. These provide the context of the deployment, including the resource outputs.
Output
The return value is a Module System configuration, including attributes such as config and options.
mkDeployment
Turn a list of deployment modules and some other parameters into the format expected by the nixops4 command, and add a few useful attributes.
Type
{ modules, ... } -> nixops4Deployment
Input attributes
-
modules: A list of modules to evaluate. -
specialArgs: A set of arguments to pass to the modules these are available whileimportsare evaluated, but are not overridable or extensible, unlike the_module.argsoption. -
prefix: A list of strings representing the location of the deployment. Typical value:[ "nixops4Deployments" name ]
Output attributes
-
_type:"nixops4Deployment" -
deploymentFunction: Internal value fornixops4to use. -
getProviders: A function that returns a derivation for the providers of the deployment.system: The system for which to get the providers. Examples:"x86_64-linux""aarch64-darwin"
A derivation whose output references the providers for the deployment.
renderProviderDocs
Generate documentation for a NixOps4 provider module.
This function renders markdown documentation for all resource types defined in a provider module, including their inputs and outputs.
Arguments
system: The system string (e.g., "x86_64-linux")module: A NixOps4 provider module containing resource type definitions and documentation metadata (name,description,sourceBaseUrl,sourceName)
Example
renderProviderDocs {
system = "x86_64-linux";
module = self.modules.nixops4Provider.local;
}
Type
renderProviderDocs :: {
system :: String,
module :: NixModule
} -> Derivation
The resulting derivation contains markdown files for each resource type plus an index.md file. The files use mdBook-compatible includes for option documentation.