Functional Infrastructure With Nix - Part 2 of 2
summary
Walks through building a Haskell JSON API with Nix, packaging it as a Nix derivation, and using NixOS + NixOps to provision t2.nano EC2 instances, configure systemd and nginx, and wire a static front end to a back end proxy. Demonstrates NixOps deploy creates EC2 instances, building locally then pushing artifacts, scaling the back end from 1 to 3 nodes, and nginx proxy with round-robin across three backends. Shows automated Let's Encrypt TLS, quick rollback to prior deployment, and one practical failure: AWS quota and campus Wi‑Fi block interfere with some live demos.
AI-written summary · about
chapters (15)
- 0:00Building functional infrastructure cluster
- 0:35Haskell JSON API backend
- 4:17Backend as Nix derivation
- 7:07Configuring backend with NixOS
- 11:08Deployment targets VirtualBox and EC2
- 15:57Creating NixOps deployment
- 23:22NixOps vs Ansible and Docker
- 29:20Deploying static frontend with Nginx
- 36:10Proxy for frontend and backend
- 41:48DNS with Route 53
- 44:43Scaling backend instances
- 48:25Rolling back deployments
- 49:28HTTPS with Let's Encrypt
- 52:30Adding database infrastructure
- 53:42Q&A
related talks
48mFrom Zero to Application Delivery with NixOS
36mFunctional programming and Nix for reproducible, immutable infrastructure
34mNix for developers and ops
18mNix: FP for your packages and deployments
41mCloud Native Nix!
40mBut It Builds on My Machine!: Building Deterministic OCI Images With Nix
21m"I use NixOS btw..." Learnings from 2 years daily driving NixOS
15mBuilding Developer-Friendly Spaces: Nix in a Nutshell
