NixOps4 Components
Overview
This shows the main types of components that exist around NixOps4.
flowchart TD cli["NixOps4"] configurations["Configurations"] modules["Modules"] exprs["Deployment Expressions"] resourceProviders["Resource Providers"] resources["Resources"] configurations -->|are| modules modules -->|implement| exprs exprs -->|declare| resourceProviders resourceProviders -->|operate on| resources exprs -->|declare| resources cli -->|calls| resourceProviders cli -->|calls| exprs
Nix Expressions
flowchart TD flakes["Flakes"] configurations["Configurations"] modules["Modules"] resourceProviders["Resource Providers"] flakes -->|contain| configurations flakes -->|contain| modules flakes -->|contain| resourceProviders flakes -->|reference by flake inputs| flakes configurations -->|reference by imports| modules modules -->|reference by imports| modules modules -->|reference by flake self or withSystem| resourceProviders
Any node can reference packages.
Crate Structure
NixOps4 is implemented in Rust, and it links to the Nix package manager to integrate with the Nix language and store.
It is composed of the following Rust crates:
graph TD; nixops4-eval --> nixops4-core nixops4-resource-runner --> nixops4-resource nixops4-resources-local --> nixops4-resource nixops4 --> nixops4-core nixops4 --> nixops4-eval nixops4 --> nixops4-resource nixops4 --> nixops4-resource-runner click nixops4-core "#nixops4-core" "nixops4-core" click nixops4-eval "#nixops4-eval" "nixops4-eval" click nixops4-resource-runner "#nixops4-resource-runner" "nixops4-resource-runner" click nixops4-resource "#nixops4-resource" "nixops4-resource" click nixops4-resources-local "#nixops4-resources-local" "nixops4-resources-local" click nixops4 "#nixops4" "nixops4"
nixops4-core
Internal interfaces for nixops4, notably the interface between the CLI and the nixops4-eval
evaluator
nixops4-eval
Internal child process of nixops4
that performs Nix evaluation
nixops4-resource-runner
A utility to run resource providers without expressions, and without nixops4
, primarily for testing
nixops4-resource
A library for the NixOps resource provider interface
nixops4-resources-local
A basic NixOps resource provider for local operations. Note that because of their flexibility and local behavior, these resources require extra care to make sure the deployment is reproducible.
nixops4
The nixops4
command-line tool