summaryrefslogtreecommitdiff
path: root/chaski/services
diff options
context:
space:
mode:
authorstuebinm2022-12-19 21:08:51 +0100
committerstuebinm2022-12-19 21:10:32 +0100
commit06a24c5eca87eb6c13c45655f17b568fc7f1012d (patch)
treea8b4a75de8ab6f7b29b90c180419b78c36647300 /chaski/services
parent6ea3acdd184d3f657dd521e7d477f2138f8b0918 (diff)
chaski: serve 22f3 room plans
Diffstat (limited to 'chaski/services')
-rw-r--r--chaski/services/22f3.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/chaski/services/22f3.nix b/chaski/services/22f3.nix
new file mode 100644
index 0000000..877966c
--- /dev/null
+++ b/chaski/services/22f3.nix
@@ -0,0 +1,31 @@
+{ config, lib, pkgs, inputs, ... }:
+
+let
+ roomplans = pkgs.stdenv.mkDerivation {
+ name = "22f3-roomplans";
+ src = inputs.freiraum;
+ buildInputs = with pkgs; [ poppler_utils inkscape gauche ];
+ buildPhase = ''
+ cp $src/* .
+ gosh ./generate.scm
+ '';
+ installPhase = ''
+ mkdir -p $out;
+ cp out/combined.pdf $out/raumplan.pdf
+ cp svg/* $out
+ '';
+ };
+in
+
+{
+ services.nginx.virtualHosts."22f3.stuebinm.eu" = {
+ enableACME = true;
+ forceSSL = true;
+ locations."/" = {
+ root = roomplans.outPath;
+ extraConfig = ''
+ autoindex on;
+ '';
+ };
+ };
+}