summary refs log tree commit diff
path: root/nixos/tests/trilium-server.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/trilium-server.nix')
-rw-r--r--nixos/tests/trilium-server.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/nixos/tests/trilium-server.nix b/nixos/tests/trilium-server.nix
index ca9e8ba2c56..6346575b33d 100644
--- a/nixos/tests/trilium-server.nix
+++ b/nixos/tests/trilium-server.nix
@@ -10,6 +10,14 @@ import ./make-test-python.nix ({ ... }: {
         dataDir = "/data/trilium";
       };
     };
+
+    nginx = {
+      services.trilium-server = {
+        enable = true;
+        nginx.enable = true;
+        nginx.hostName = "trilium.example.com";
+      };
+    };
   };
 
   testScript =
@@ -33,5 +41,13 @@ import ./make-test-python.nix ({ ... }: {
       with subtest("configured with custom data store"):
           configured.wait_for_unit("trilium-server.service")
           configured.succeed("test -f /data/trilium/document.db")
+
+      with subtest("nginx with custom host name"):
+          nginx.wait_for_unit("trilium-server.service")
+          nginx.wait_for_unit("nginx.service")
+
+          nginx.succeed(
+              "curl --resolve 'trilium.example.com:80:127.0.0.1' http://trilium.example.com/"
+          )
     '';
 })