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

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

  1. Arguments for evalModules - i.e. the Module System. These are adjusted to include NixOps-specific arguments.

  2. 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 while imports are evaluated, but are not overridable or extensible, unlike the _module.args option.

  • prefix: A list of strings representing the location of the deployment. Typical value: [ "nixops4Deployments" name ]

Output attributes

  • _type: "nixops4Deployment"

  • deploymentFunction: Internal value for nixops4 to use.

  • getProviders: A function that returns a derivation for the providers of the deployment.

    Input attributes

    • system: The system for which to get the providers. Examples:
      • "x86_64-linux"
      • "aarch64-darwin"

    Output

    A derivation whose output references the providers for the deployment.