Nix

Introducing NixOS Anywhere

At Numtide, we deploy NixOS to various infrastructure providers and target platforms daily. This blog post introduces NixOS Anywhere, a tool we built to make our lives easier.
- 3 min read
Introducing NixOS Anywhere

At Numtide, we deploy NixOS to various infrastructure providers and target platforms daily. As our operating system of choice, we've gotten pretty good at spinning up a fresh NixOS install.

It doesn't matter to us whether you want to run your software on a virtual machine in AWS, a bare-metal server in Hetzner, or an industrial robot on your factory floor. We have solutions for each, built up through many years of experience.

But that isn't to say it has been easy.

Complexity

With each infrastructure provider or on-premises setup comes unique constraints which require different approaches. For some, we can leverage Netboot; for others, we can create a base image such as an AMI. We often have to tailor our deployment strategies for each client engagement.

As you can imagine, maintaining various solutions to the same problem can be time-consuming. And it is only sometimes possible to automate the installation process. More often than we would like, we find ourselves playing the role of babysitter.

What we want is to be able to bootstrap NixOS anywhere.

So we created NixOS Anywhere.

GitHub - numtide/nixos-anywhere: install nixos everywhere via ssh
install nixos everywhere via ssh. Contribute to numtide/nixos-anywhere development by creating an account on GitHub.

Keep It Simple (Stupid)

There are two requirements when setting up a fresh NixOS install using NixOS Anywhere:

  1. the target device must be running a Linux kernel
  2. and we must have SSH access.

We don't particularly care what flavour of Linux the target device starts with.

And since every infrastructure provider lets you provision new instances with some base Linux OS in a few clicks or with a terminal command, we can be up and running on your provider of choice in no time.

It takes only 2m24 for a fully functioning machine

Better yet, if you have existing infrastructure, be it cloud-based or on-premise, we can migrate to NixOS in place, one machine at a time.

Improving Choice

Choosing where and how to run your IT infrastructure is critical as a business.

Finding the right provider for your price point and resource needs can be difficult. And often, those same providers will offer heavy discounts if you chose their bespoke solutions and managed offerings, which only exacerbates the problem of vendor lock-in.

More recently, we have seen a trend of migrating from virtual machines in cloud providers such as AWS and GCP to bare-metal servers in providers such as Hetzner and OVH. The increased resources available at a fraction of the price are very attractive, especially for resource-intensive applications such as machine learning or blockchain.

But with a move to bare-metal comes an increased ops burden.

At Numtide, we feel NixOS helps make that ops burden more manageable. So by making it easier to run NixOS anywhere, we provide our clients, and everyone in general, with greater freedom of choice when deciding where they run their infrastructure.

share

Related posts

Donating SrvOS to nix-community

SrvOS is a collection of opinionated defaults for NixOS, optimized for server environments. Today we are giving this project to nix-community.