Skip to content

Commit

Permalink
docs(nixery): replace the Nixery mdBook with a simple web page
Browse files Browse the repository at this point in the history
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 #156

Change-Id: I20e1d58f1e6608377207e80345c169f7d92d3847
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6930
Autosubmit: tazjin <[email protected]>
Tested-by: BuildkiteCI
Reviewed-by: flokli <[email protected]>
  • Loading branch information
tazjin committed Oct 12, 2022
1 parent 644521d commit a9b3e48
Show file tree
Hide file tree
Showing 15 changed files with 171 additions and 569 deletions.
35 changes: 5 additions & 30 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };

Expand All @@ -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
'';

Expand Down
1 change: 0 additions & 1 deletion docs/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions docs/book.toml

This file was deleted.

22 changes: 0 additions & 22 deletions docs/default.nix

This file was deleted.

8 changes: 0 additions & 8 deletions docs/src/SUMMARY.md

This file was deleted.

69 changes: 0 additions & 69 deletions docs/src/caching.md

This file was deleted.

2 changes: 0 additions & 2 deletions docs/src/nix-1p.md

This file was deleted.

31 changes: 0 additions & 31 deletions docs/src/nix.md

This file was deleted.

72 changes: 0 additions & 72 deletions docs/src/nixery.md

This file was deleted.

Loading

0 comments on commit a9b3e48

Please sign in to comment.