nixos-misc: generate book #154

Merged
sandro merged 1 commits from book into master 2024-07-04 22:25:00 +02:00
3 changed files with 15 additions and 8 deletions

View File

@ -1,10 +1,3 @@
---
gitea: none
title: Flockige Infrastruktur deklarativ
include_toc: yes
lang: en
---
# C3D2 infrastructure based on NixOS
## Further documentation

6
book.toml Normal file
View File

@ -0,0 +1,6 @@
[book]
authors = ["C3D2"]
language = "en"
multilingual = false
src = ""
title = "C3D2 NixOS Configuration"

View File

@ -28,7 +28,15 @@
default = true;
forceSSL = true;
enableACME = true;
locations."/".return = "307 https://search.nixos.c3d2.de";
locations."/".root = pkgs.runCommand "nixos-web" {
nativeBuildInputs = with pkgs; [ mdbook moreutils xorg.lndir ];
} ''
mkdir docs
lndir ${self} docs
cd docs
find -iname '*.md' -exec bash -c 'echo "- [$(grep '"'"'# '"'"' {} | head -n 1 | awk '"'"'{ print $2 }'"'"')]({})"' \; | sponge SUMMARY.md
mdbook build -d $out .
'';
};
"code.nixos.c3d2.de" = {
forceSSL = true;