summaryrefslogtreecommitdiff
path: root/hosts/flora/services/surveys.nix
blob: befa6730fd988096eeddc66c25270b48ac90824b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{pkgs, config, ...}:

let survey = pkgs.fetchgit {
      url = "https://stuebinm.eu/git/slightly-better-surveys";
      rev = "c255269db0c739400b62d4c4041e3238b1045d22";
      sha256 = "007q6s5xc3kn3dy1zj7hc94wyn495qam2x1020br3crwgpxy3hmp";
    };
in
{
  services.nginx.virtualHosts."survey.stuebinm.eu" = {
    locations."/".root = survey.outPath + "/site";
    locations."/upload".proxyPass = "http://localhost:8080";

    enableACME = true;
    forceSSL = true;
  };

  services.nginx.appendHttpConfig = ''
    types {
        application/wasm wasm;
    }
  '';
}