summary refs log tree commit diff
path: root/host/Rory-nginx/services
diff options
context:
space:
mode:
Diffstat (limited to 'host/Rory-nginx/services')
-rwxr-xr-xhost/Rory-nginx/services/nginx/nginx.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/host/Rory-nginx/services/nginx/nginx.nix b/host/Rory-nginx/services/nginx/nginx.nix
index 91340c7..2e2d671 100755
--- a/host/Rory-nginx/services/nginx/nginx.nix
+++ b/host/Rory-nginx/services/nginx/nginx.nix
@@ -1,6 +1,16 @@
 { config, pkgs, lib, ... }:
-
-{
+let 
+  serveDir = config : {
+    enableACME = if config ? ssl then config.ssl else true;
+    addSSL = if config ? ssl then config.ssl else true;
+    root = if config ? path then config.path else builtins.throw "path is required";
+    locations = {
+      "/" = {
+        index = "index.html";
+      };
+    };
+  };
+in {
   services = {
     nginx = {
       enable = true;