summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--flake.lock18
-rw-r--r--flake.nix2
-rw-r--r--flora/services/blog.nix18
3 files changed, 38 insertions, 0 deletions
diff --git a/flake.lock b/flake.lock
index 441ee32..27abe89 100644
--- a/flake.lock
+++ b/flake.lock
@@ -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",
diff --git a/flake.nix b/flake.nix
index 148c31d..0a7fe56 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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}/";
};
}