Change around the lxc build stuff a touch. We now have service configs that look like:

{ pkgs ? (import <nixpkgs>) {}}:
  with pkgs;
  tsp.container ({ configuration, lxcLib }:
    rec {
      name = "ec2http";
      storeMounts = [ tsp_http_lxc tsp_hosts_lxc ];
      configuration = {
        "network.networks" = [{ipv4 = "10.0.0.52/24";}];
        "network.hostname"  = "ec2http";
        "http.erlang.cookie" = "KOKVFQBPHLOKKNBILOBV";
        "http.router.hostname" = "ec2router";
        "http.start" = true;
        "hosts" = import ./hosts.nix;
      };
    })

and we can include them (and configure them) in /etc/nixos/configuration.nix like:

{ config, pkgs, modulesPath, ...}:
{
  imports = [ "${modulesPath}/virtualisation/amazon-config.nix"
              (pkgs.tsp.module /root/services/http.nix)
            ];
  services.lxc.ec2http.enable = true;
  services.lxc.ec2http.containerPath = "/tmp/http";
  services.lxc.ec2http.containerName = "http";
}

Rebuild with nixos-rebuild -I nixpkgs=/path/to/nixpkgs switch;
Build individual service with nix-build -I nixpkgs=/path/to/nixpkgs /path/to/service.nix -A scripts

Lovely!