summaryrefslogtreecommitdiff
path: root/chaski/services/22f3.nix
blob: 877966cdca65197a5d734ecaebdb4b32da45994a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
      '';
    };
  };
}