summaryrefslogtreecommitdiff
path: root/flora/services/blog.nix
blob: 15c064697f3431e6adc3a150955b983c06949978 (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
{ config, lib, pkgs, inputs, ... }:

let
  gtfsBooks = pkgs.stdenv.mkDerivation {
    name = "gtfs-mdbooks";
    src = inputs.gtfsBooks;
    buildInputs = [ pkgs.mdbook ];
    buildPhase = ''
      ./build.sh
    '';
    installPhase = ''
      mkdir -p $out
      mv gtfs-book-html $out/gtfs
      mv gtfs-realtime-book-html $out/gtfs-realtime
    '';
  };
in


{
  services.nginx.virtualHosts."stuebinm.eu" = {
    enableACME = true;
    forceSSL = true;
    locations."/".root = import inputs.blog { inherit pkgs; };
    locations."/bookshelf/".alias = "${gtfsBooks.outPath}/";
  };
}