Deploying NixOS to Amazon EC2

Contents
  • Launching an EC2 instance
  • Building NixOS locally
  • Deploying a local build
  • Show notes
Video
  • 5 videos, 36 minutes total

Most of the code that powers the Type Classes website is written in Haskell and running on Amazon EC2. In this project we walk through the process of how we developed our deploy process. We start by clicking around in the AWS web console, and we end up with some scripts and a fairly simple process that we now use to provision our servers from the command line.

We use these command-line tools:

  • nix-build, to compile everything that runs on our sever
  • nix-copy-closure, to upload build results to the server
  • ssh, to activate changes on the server and switch to a new build

The scripts we write here are written in Haskell, using:

You can see the final results in the Type Classes projects GitHub repository.

Sign up for access to the full page, plus the complete archive and all the latest content.