Sander van der Burg - Dysnomia: complementing Nix deployments (NixCon 2018)
Channel: NixCon
Date: 2018-11-12

One of the main goals of the tools in the Nix project is to fully automate deployments from declarative specifications. Thanks to the underlying purely functional deployment model of the Nix package manager, we get strong guarantees that dependencies are complete, we get (nearly) bit identical builds, and we can do atomic upgrades and rollbacks. Although Nix deployments are very powerful, the tools in the Nix project only manage the static parts of a system, such as packages and configuration files. Nix does not manage any state, such as databases. As a result, when deploying a NixOS configuration to a different machine, we get the same static system configuration (e.g. packages and configuration), but any state must still be manually migrated and deployed. In a network of machines, this could become very tedious. In this talk, I will show Dysnomia (https://github.com/svanderburg/dysnomia), a deployment tool inspired by Nix that can be used to manage units of state, such as databases. It makes units of states uniformly accessible (it has a plugin system supporting many kinds of state and databases), executes various deployment activities (e.g. activation, deactivation) and can manage snapshots of state in a snapshot store that has similarities with the Nix store. Dysnomia can be used as an independent tool, but is more useful when it is combined with tools in the Nix project -- we can automatically deploy databases as part of a NixOS configuration and we can combine it with Disnix to automatically migrate databases from one machine to another. --- Sander is a contributor to the Nix project since late 2007. He contributed to many areas in the Nix-ecosystem. He started the Android build environment. He maintains various Nix-related tools, such as Disnix, node2nix, NiJS, and composer2nix.