diff options
author | Christian Kampka <christian@kampka.net> | 2019-12-06 14:20:39 +0100 |
---|---|---|
committer | Christian Kampka <christian@kampka.net> | 2019-12-19 10:14:13 +0100 |
commit | 9f97485399e8766565374126a4278292e4e82623 (patch) | |
tree | 405a53b2d67a3011418d8851238f586c5e10e176 /nixos/tests/trilium-server.nix | |
parent | 82f038d46861062140511c55ece98bb37954dc93 (diff) | |
download | nixpkgs-9f97485399e8766565374126a4278292e4e82623.tar nixpkgs-9f97485399e8766565374126a4278292e4e82623.tar.gz nixpkgs-9f97485399e8766565374126a4278292e4e82623.tar.bz2 nixpkgs-9f97485399e8766565374126a4278292e4e82623.tar.lz nixpkgs-9f97485399e8766565374126a4278292e4e82623.tar.xz nixpkgs-9f97485399e8766565374126a4278292e4e82623.tar.zst nixpkgs-9f97485399e8766565374126a4278292e4e82623.zip |
trilium-server: Add nginx reverse proxy configuration to module
Diffstat (limited to 'nixos/tests/trilium-server.nix')
-rw-r--r-- | nixos/tests/trilium-server.nix | 16 |
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/" + ) ''; }) |