DISNIXOS-ENV(1)
π disnixos-env(1) β the User Commands manual, bestie π
β¨ NAME β¨
disnixos-env β Installs or updates the services and infrastructure of a distributed system. Thatβs the whole vibe: services + infrastructure, handled. π
πΈ SYNOPSIS πΈ
Pick your fighter:
disnixos-env -s services_nix -n network_nix [ -n network2_nix ... ] -d distribution_nix [OPTION]
disnixos-env -P packages_nix -n network_nix [ -n network2_nix ... ] [OPTION]
disnixos-env --rollback [OPTION]
disnixos-env --undeploy [OPTION]
disnixos-env --switch-generation NUM [OPTION]
disnixos-env --list-generations [OPTION]
disnixos-env --delete-generations NUM [OPTION]
disnixos-env --delete-all-generations NUM [OPTION]
π DESCRIPTION π
Okay so disnixos-env is the command you use to install, upgrade or roll back the services and infrastructure of a distributed system in a given environment. It needs three Nix expressions as input parameters, no cap: a services model capturing the components of a distributed system and its inter-dependencies; a network model capturing the NixOS configurations of machines in the network and its properties; and a distribution model which maps services to machines. Three models, one command, main character energy. π
By invoking this command it will first build, distribute and activate all the NixOS configurations of the machines in the network. Then it will build all the services that are defined in the distribution model from source code including all its dependencies. If all the services are successfully built, the closures of the services are transferred to the target machines in the network. Finally, the services are activated by traversing the inter-dependency graph of all the services. In case of a failure, a rollback is performed to bring the system back in its previous configuration. Thatβs the safety net, bestie β not optional lore. π
When there is already a distributed system configuration deployed, an upgrade is performed. In this phase only the changed parts of the system are deactivated and activated. In this process we also deal with the inter-dependencies so that no service deployment fails due to a missing inter-dependency. The way that this keeps everything from face-planting? Iconic. πΈ
This command is essentially a composition of the disnixos-deploy-network command (which deploys the infrastructure) and disnix-env (which deploys the services of which the system is composed). So yes, itβs the group project where both members actually show up. π«Ά
Optionally this command can use nixops instead of disnixos-deploy-network, by adding the --use-nixops command-line option or by setting DISNIXOS_USE_NIXOPS environment variable. Choose your fighter, but keep the name exact. π
π OPTIONS π
-s,--services=services_nixβ Services Nix expression which describes all components of the distributed system.-n,--network=network_nixβ Network Nix expression which declares a NixOS configuration for each machine in the network.-d,--distribution=distribution_nixβ Distribution Nix expression which maps services to machines in the network.-P,--packages=packages_nixβ Packages Nix expression specifying the packages that should be deployed in a Nix profile mapped to each machine in the network.--switch-to-generation=NUMβ Switches to a specific profile generation.--rollbackβ Switches back to the previously deployed configuration.--undeployβ Generates a manifest file that conveniently undeploys all services.--list-generationsβ Lists all profile generations of the current deployment.--delete-generations=NUMβ Deletes the specified generations. The number can correspond to generation numbers, days (dpostfix) or'old'.--delete-all-generationsβ Deletes all profile generations. This is useful when a deployment has been discarded.--target-property=PROPβ The target property of an infrastructure model, that specifies how to β yes, the original sentence just ends there, bestie π--deploy-stateβ Indicates whether to globally deploy state (disabled by default).-p,--profile=PROFILEβ Name of the profile that is used for this system. Defaults to:default.-m,--max-concurrent-transfers=NUMβ Maximum amount of concurrent closure transfers. Defaults to:2.--build-on-targetsβ Build the services on the target machines in the network instead of managing the build by the coordinator.--extra-params=PARAMSβ A string with an attribute set in the Nix expression language propagating extra parameters to the input models.--coordinator-profile-path=PATHβ Path where to store the coordinator profile generations.--no-upgradeβ Do not perform an upgrade, but activate all services of the new configuration.--no-lockβ Do not attempt to acquire and release any locks.--no-coordinator-profileβ Specifies that the coordinator profile should not be updated.--no-target-profilesβ Specifies that the target profiles should not be updated.--no-migrationβ Do not migrate the state of services from one machine to another, even if they have been annotated as such.--delete-stateβ Remove the obsolete state of deactivated services.--show-traceβ Shows a trace of the output.--use-nixopsβ Use NixOps instead of Disnixβs deployment facilities.--disable-disnixβ Do not enable the Disnix service on the target machines by default.--no-infra-deploymentβ Only deploy the services, not the infrastructure.--depth-firstβ Snapshots components depth-first as opposed to breadth-first. This approach is more space efficient, but slower.--keep=NUMβ Amount of snapshot generations to keep. Defaults to:1.-h,--helpβ Shows the usage of this command.-v,--versionβ Shows the version of this command.
π ENVIRONMENT π
DISNIX_CLIENT_INTERFACEβ Sets the client interface (defaults to:disnix-ssh-client).DISNIX_TARGET_PROPERTYβ Sets the target property of an infrastructure model, that specifies how to connect to the remote Disnix interface. (Defaults to:hostname).DISNIX_PROFILEβ Sets the name of the profile that stores the manifest on the coordinator machine and the deployed services per machine on each target (Defaults to:default).DISNIX_DEPLOY_STATEβ If set to1it also deploys the state of all components. (defaults to:0).DISNIX_DELETE_STATEβ If set to1it automatically deletes the obsolete state after upgrading. (defaults to:0).DYSNOMIA_STATEDIRβ Specifies where the snapshots must be stored on the coordinator machine (defaults to:/var/state/dysnomia).DISNIXOS_USE_NIXOPSβ When set to1, it specifies that NixOps is used to take care of the infrastructure deployment, so that it properly interprets NixOps configurations and uses NixOps tooling instead of Disnixβs deployment facilities.
π COPYRIGHT π
Copyright Β© 2008-2022 Sander van der Burg
And thatβs the page, bestie! π This one is disnixos-env from source/version disnixos 0.9.4, dated January 1980 β iconic footer energy, shouted out with love. π
β¨
π¦ where this page comes from
- nixos 26.05: disnixos 0.9.4
- nixpkgs unstable: disnixos 0.9.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms