An exercise in handling complexity

valve manifold

NixOS is a Linux distribution that uses the Nix programming language to build software. It allows you to describe the state of your system, like what software is installed, how it is configured, and which services to run, all in .nix files.

Using Nix to build an OpenStreetMap tile server


A few Nix one-liners

Build drawterm on a new NixOS server:

nix-shell -p mercurial gnumake x11 --run "hg clone; cd drawterm; CONF=unix make"

Then you can use headless drawterm over ssh with:

./drawterm -G -u <user> -h <host>

Serve the current directory with python (requires 8000 to be in the list of networking.firewall.allowedTCPPorts = [ ... ])

nix-shell -p python --run "python -m SimpleHTTPServer"