Fix nginx.nix syntax errors

There were a few instances of missing brackets and missing "builtins."s. This
change fixes all of them

Change-Id: Iad63a17224f952bc72b3affe2a265bb35e59a684
diff --git a/nginx.nix b/nginx.nix
index 1fce41b..877dc21 100644
--- a/nginx.nix
+++ b/nginx.nix
@@ -9,8 +9,8 @@
     };
     Hosts = hosts: service: {
         inherit service;
-        host = elemAt hosts 0;
-        extraHosts = tail hosts;
+        host = builtins.elemAt hosts 0;
+        extraHosts = builtins.tail hosts;
         secure = true;
         type = "hosts";
     };
@@ -22,8 +22,8 @@
     };
     InsecureHosts = hosts: service: {
         inherit service;
-        host = elemAt hosts 0;
-        extraHosts = tail hosts;
+        host = builtins.elemAt hosts 0;
+        extraHosts = builtins.tail hosts;
         secure = false;
         type = "hosts";
     };
@@ -65,14 +65,14 @@
     Merge = let
     # builtins.length and count up
         _iterateCompose = services: currentConfig: currentPath: secure: priority: i:
-            if i > length services
+            if i > builtins.length services
                 then currentConfig
-                else _iterateCompose services (_merge (elemAt services i) currentConfig currentPath secure priority+i) currentPath secure priority (i+1);
+                else _iterateCompose services (_merge (builtins.elemAt services i) currentConfig currentPath secure priority+i) currentPath secure priority (i+1);
 
         _iterateMerge = i: current: services:
-            if i > length services
+            if i > builtins.length services
                 then current
-                else _iterateMerge (i+1) (current++[_merge (elemAt services i) {} "/" true 1000]) services;
+                else _iterateMerge (i+1) (current++[_merge (builtins.elemAt services i) {} "/" true 1000]) services;
 
         _merge = service: currentConfig: currentPath: secure: priority:
             if service.type == "hosts"
@@ -132,7 +132,7 @@
                         root = service.root;
                         index = "index.html index.htm";
                         tryFiles = "$uri $uri/ =404";
-                        extraConfig = lib.optionalString !service.private "autoindex on;";
+                        extraConfig = lib.optionalString (!service.private) "autoindex on;";
                     };
                 })
             else if service.type == "file"