From 9f97485399e8766565374126a4278292e4e82623 Mon Sep 17 00:00:00 2001 From: Christian Kampka Date: Fri, 6 Dec 2019 14:20:39 +0100 Subject: trilium-server: Add nginx reverse proxy configuration to module --- nixos/tests/trilium-server.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'nixos/tests/trilium-server.nix') 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/" + ) ''; }) -- cgit 1.4.1