From 6119abda225fe14bc65ff7581640da0f435457f4 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Tue, 14 Jun 2022 00:54:35 +0200 Subject: bookshelf (with gtfs books) --- flora/services/blog.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'flora/services') diff --git a/flora/services/blog.nix b/flora/services/blog.nix index 0111f8f..15c0646 100644 --- a/flora/services/blog.nix +++ b/flora/services/blog.nix @@ -1,9 +1,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}/"; }; } -- cgit v1.2.3