From 48e2be7427768ad99a1bfbd754e4e1e9bb7c2e5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Wed, 15 Dec 2021 15:01:19 +0100 Subject: [PATCH] feat(tarot): serve files and waites key --- configs/tarot.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/configs/tarot.nix b/configs/tarot.nix index ac9587a..4c5d8b0 100644 --- a/configs/tarot.nix +++ b/configs/tarot.nix @@ -6,6 +6,10 @@ let sha256 = "0jl5vdwlj17pqp94yj02xgsb1gyvs9i08m83kac0jdnhfjl2f75a"; stripRoot = false; }; + tarotKey = builtins.fetchurl { + url = "http://c.krebsco.de/tarot.pdf"; + sha256 = "19y0qh00qsbbxm1had6jh66d1gq57cjccsqnlwjmr001r2hgjgg8"; + }; in { krebs.htgen.tarot = { @@ -40,6 +44,18 @@ in services.nginx.virtualHosts."tarot.kmein.de" = { enableACME = true; forceSSL = true; - locations."/".proxyPass = "http://127.0.0.1:${toString tarotPort}"; + locations = { + "/".proxyPass = "http://127.0.0.1:${toString tarotPort}"; + "/files/" = { + root = pkgs.linkFarm "tarot" [ + { name = "files/key.pdf"; path = tarotKey; } + { name = "files/cards"; path = tarotFiles; } + ]; + extraConfig = '' + autoindex on; + charset UTF-8; + ''; + }; + }; }; }