docs(nixery): replace the Nixery mdBook with a simple web page

Nixery's previous landing page was an mdBook that was basically
unmaintained and full of incorrect information. It also duplicated
some things (like nix-1p) which actually live elsewhere.

This commit removes the mdBook completely and reduces it down to a
simple TVL-style landing page. The landing page has been checked in
in its entirety because Nixery is frequently cloned through josh
without the entirety of depot, however the page has been created by
building it through depot's //web/tvl/template.

See also https://github.com/tazjin/nixery/issues/156

Change-Id: I20e1d58f1e6608377207e80345c169f7d92d3847
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6930
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Vincent Ambo 2022-10-10 23:17:13 +03:00 committed by tazjin
parent 224ec708f7
commit 7c99e9e8e3
15 changed files with 171 additions and 569 deletions

View file

@ -24,40 +24,15 @@ let
# Avoid extracting this from git until we have a way to plumb
# through revision numbers.
nixery-commit-hash = "depot";
# If Nixery is built outside of depot, it needs to dynamically fetch
# the current nix-1p.
nix-1p-git = builtins.fetchGit {
url = "https://code.tvl.fyi/depot.git:/nix/nix-1p.git";
ref = "canon";
};
in
depot.nix.readTree.drvTargets rec {
# Implementation of the Nix image building logic
nixery-prepare-image = import ./prepare-image { inherit pkgs; };
# Use mdBook to build a static asset page which Nixery can then
# serve. This is primarily used for the public instance at
# nixery.dev.
#
# If the nixpkgs commit is known, append it to the main docs page.
nixery-book = callPackage ./docs {
nix-1p = depot.nix.nix-1p or nix-1p-git;
postamble = lib.optionalString (pkgs ? nixpkgsCommits.unstable) ''
### Which revision of `nixpkgs` is used for the builds?
The current revision of `nixpkgs` is
[`${pkgs.nixpkgsCommits.unstable}`][commit] from the
`nixos-unstable` channel.
This instance of Nixery uses the `nixpkgs` channel pinned by TVL
in [`//third_party/sources/sources.json`][sources].
[commit]: https://github.com/NixOS/nixpkgs/commit/${pkgs.nixpkgsCommits.unstable}
[sources]: https://code.tvl.fyi/tree/third_party/sources/sources.json
'';
};
# Include the Nixery website into the Nix store, unless its being
# overridden to something else. Nixery will serve this as its front
# page when visited from a browser.
nixery-web = ./web;
nixery-popcount = callPackage ./popcount { };
@ -84,7 +59,7 @@ depot.nix.readTree.drvTargets rec {
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/server \
--set WEB_DIR "${nixery-book}" \
--set WEB_DIR "${nixery-web}" \
--prefix PATH : ${nixery-prepare-image}/bin
'';