diff --git a/sys/srv/default.nix b/sys/srv/default.nix index 38cddaa..911ad81 100644 --- a/sys/srv/default.nix +++ b/sys/srv/default.nix @@ -19,5 +19,6 @@ with lib; { ./kuma.nix # ./authentik.nix consumes too much RAM and serves no purpose for now ./paperless.nix + ./trilium.nix ]; } diff --git a/sys/srv/trilium.nix b/sys/srv/trilium.nix new file mode 100644 index 0000000..6e9ea1f --- /dev/null +++ b/sys/srv/trilium.nix @@ -0,0 +1,32 @@ +{ + lib, + pkgs, + ... +}: +with lib; { + services = { + nginx = { + virtualHosts."notes.posixlycorrect.com" = { + enableACME = true; + forceSSL = true; + extraConfig = '' + proxy_headers_hash_max_size 512; + proxy_headers_hash_bucket_size 128; + ''; + }; + }; + + trilium-server = { + enable = true; + host = "127.0.0.1"; + port = 8458; + noAuthentication = false; + instanceName = "posixlycorrect"; + dataDir = "/var/lib/trilium"; + nginx = { + enalbe = true; + hostName = "notes.posixlycorrect.com"; + }; + }; + }; +}