From 3a572a9222e74724f9640678e86603e351b08937 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Sun, 5 Oct 2025 23:06:34 -0500 Subject: [PATCH] add a tailnet overlay network verison for trillium to test the android app --- hosts/h001/mods/trilium.nix | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/hosts/h001/mods/trilium.nix b/hosts/h001/mods/trilium.nix index 0797cda..94f600c 100644 --- a/hosts/h001/mods/trilium.nix +++ b/hosts/h001/mods/trilium.nix @@ -1,10 +1,12 @@ { + upkgs, ... }: { config = { services.trilium-server = { enable = true; + package = upkgs.trilium-server; port = 9111; host = "127.0.0.1"; dataDir = "/var/lib/trilium"; @@ -19,12 +21,30 @@ services.oauth2-proxy.nginx.virtualHosts."notes.joshuabell.xyz" = { allowed_groups = [ "notes" ]; }; - services.nginx.virtualHosts."notes.joshuabell.xyz" = { - locations = { - "/" = { - proxyWebsockets = true; - recommendedProxySettings = true; - proxyPass = "http://127.0.0.1:9111"; + services.nginx.virtualHosts = { + "notes.joshuabell.xyz" = { + locations = { + "/" = { + proxyWebsockets = true; + recommendedProxySettings = true; + proxyPass = "http://127.0.0.1:9111"; + }; + }; + }; + "trilium_overlay" = { + serverName = "h001.net.joshuabell.xyz"; + listen = [ + { + port = 9112; + addr = "100.64.0.13"; + } + ]; + locations = { + "/" = { + proxyWebsockets = true; + recommendedProxySettings = true; + proxyPass = "http://127.0.0.1:9111"; + }; }; }; };