diff options
author | stuebinm | 2022-06-14 00:54:35 +0200 |
---|---|---|
committer | stuebinm | 2022-06-14 00:54:35 +0200 |
commit | 6119abda225fe14bc65ff7581640da0f435457f4 (patch) | |
tree | 2b100e9b3caa48a16add7283dc5687c6cf920879 | |
parent | 79516af194d2d407cb04c85f997c58b61304ef37 (diff) |
bookshelf (with gtfs books)
Diffstat (limited to '')
-rw-r--r-- | flake.lock | 18 | ||||
-rw-r--r-- | flake.nix | 2 | ||||
-rw-r--r-- | flora/services/blog.nix | 18 |
3 files changed, 38 insertions, 0 deletions
@@ -90,6 +90,23 @@ "type": "github" } }, + "gtfsBooks": { + "flake": false, + "locked": { + "lastModified": 1655155757, + "narHash": "sha256-d9TvfhdttfO9r0BdmOYeWQuxfiRCefPTs5eQ67KJJnw=", + "ref": "main", + "rev": "8dbb321a25705d941f7690281e495ccbd94cbdc3", + "revCount": 17, + "type": "git", + "url": "https://stuebinm.eu/git/gtfs-books" + }, + "original": { + "ref": "main", + "type": "git", + "url": "https://stuebinm.eu/git/gtfs-books" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -230,6 +247,7 @@ "blog": "blog", "deploy-rs": "deploy-rs", "feeds": "feeds", + "gtfsBooks": "gtfsBooks", "home-manager": "home-manager", "naersk": "naersk", "nixpkgs": "nixpkgs", @@ -30,6 +30,8 @@ feeds.url = "path:/home/stuebinm/nonpublic.nix"; feeds.flake = false; + gtfsBooks.url = "git+https://stuebinm.eu/git/gtfs-books?ref=main"; + gtfsBooks.flake = false; walint.url = "git+https://stuebinm.eu/git/walint?ref=playground"; walint.flake = false; }; 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}/"; }; } |