Introducing Nivis: A Marriage Between Terraform and Nix

post thumb
DevOps
by Pim Snel/ on 16 Jun 2026

Introducing Nivis: A Marriage Between Terraform and Nix

At TechNative, we are convinced that Nix is one of the most promising software technologies for the future of infrastructure automation. Today we are excited to introduce Nivis: an experimental project that brings Terraform and Nix together as a new approach to Infrastructure as Code. Or, as we like to call it, Infrastructure as Nix Code.

Where the idea came from

The idea took shape after a recent Nix meetup at the VU in Amsterdam. The thought of merging Nix and Terraform into a single, coherent Terraform alternative would not let go. Robert Hensing has been building this kind of functionality for some time in the NixOps4 project, but that effort is not yet production-ready. Following an inspiring conversation with Robert, the path forward suddenly became clear, and how it could be made usable quickly with the help of AI-assisted development. Credit where credit is due: Robert set us firmly on the right track.

The design decision

The concept was, in broad strokes, already there. A bridge had to be built between the OpenTofu providers and the Nix parser, with all provider resources treated as first-class Nix values.

By definition, this implementation is not “pure” in the way Nix traditionally insists on purity. That requirement had to be set aside. As a consequence, Nix cannot be used as the initiator that starts an evaluation.

We considered forking OpenTofu, removing its parser entirely, and replacing it with a built-in Nix parser that delegates pure Nix statements to the official Nix parser. After a thorough design discussion, however, we arrived at a different and cleaner architecture.

From plan to proof

With the plan worked out, we handed a tarball to Claude Code on Monday morning. After a full day of focused, AI-assisted engineering, the ultimate proof was in by late that evening: it genuinely works.

We had described, in a single flake, an AWS EC2 instance together with all the supporting AWS resources needed to upload a NixOS image, import it as an AMI, and attach that AMI as the image source for the EC2 instance. Within the very same flake, the NixOS image is first built with a web server capable of answering a curl request, proving that the EC2 instance is live and running exactly the NixOS configuration as described.

The marriage between Terraform and Nix had been sealed, and Nivis was born.

You can try the EC2-and-NixOS proof yourself with the tutorial that walks through this exact setup step by step. With a fast internet connection, you will have a result within 10 minutes. For an even quicker first impression of Nivis, there is also a tutorial for creating an S3 bucket with a text file brewed by Nix.

What this means

Let us be clear: Nivis is far from mature. But the fact that Nivis has a right to exist is, in our view, beyond doubt. TechNative will continue to invest in Nivis, and in Nix more broadly, because we believe Nix is the ultimate software technology for the future, and Nivis realises a significant promise for the practice of Infrastructure as Code.

Nivis is usable as of today, but the project is less than a week old, so please proceed with care. Even so, it is already exciting to imagine what Nivis will make possible. In combination with flakes in particular, it will become even easier to build infrastructure in a modular way, tightly integrated with software.

Get in touch

Want to know more about Nivis, or are you looking for professional advice on AWS and NixOS? Get in touch with our team.

Want to learn more about Nivis, AWS and NixOS?