From 19c452875ee998222dbe4063fc5078f7789c210d Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 14 Mar 2023 21:40:05 +0300 Subject: feat(tvix): add simple initial website The website itself contains no useful information that we don't already have published anywhere, but it's a decent landing place. Mostly I want to have something on the root of tvix.dev, so that we can start using it for other purposes. Change-Id: Id2b4dabc7f6e4dd26b61484b86dbde2f39aa1719 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8296 Tested-by: BuildkiteCI Reviewed-by: flokli --- tvix/website/default.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tvix/website/default.nix (limited to 'tvix/website/default.nix') diff --git a/tvix/website/default.nix b/tvix/website/default.nix new file mode 100644 index 000000000000..2dd939e8a939 --- /dev/null +++ b/tvix/website/default.nix @@ -0,0 +1,32 @@ +{ depot, lib, pkgs, ... }: + +let + # https://developers.google.com/search/docs/advanced/structured-data/logo + structuredData = { + "@context" = "https://schema.org"; + "@type" = "Organisation"; + url = "https://tvl.fyi"; + logo = "https://static.tvl.fyi/latest/logo-animated.svg"; + }; + + # All Tvix-related blog posts from the main TVL website + tvixPosts = builtins.filter + (post: !(post.draft or false) && (lib.hasInfix "Tvix" post.title)) + depot.web.tvl.blog.posts; + + postListEntries = map (p: "* [${p.title}](https://tvl.fyi/blog/${p.key})") tvixPosts; + + landing = depot.web.tvl.template { + title = "Tvix - A new implementation of Nix"; + content = '' + ${builtins.readFile ./landing-en.md} + ${builtins.concatStringsSep "\n" postListEntries} + ''; + }; + +in +pkgs.runCommand "tvix-website" { } '' + mkdir $out + cp ${landing} $out/index.html + cp ${./tvix-logo.webp} $out/tvix-logo.webp +'' -- cgit 1.4.1