2021-11-05 14:11:41 +01:00
|
|
|
{ depot, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with depot.nix.yants;
|
2020-04-21 04:16:17 +02:00
|
|
|
|
|
|
|
let
|
2021-12-01 10:32:53 +01:00
|
|
|
inherit (builtins) filter;
|
2022-09-26 19:33:05 +02:00
|
|
|
inherit (pkgs) graphviz runCommand writeText;
|
2021-11-05 14:19:06 +01:00
|
|
|
inherit (depot.web) atom-feed blog tvl;
|
2021-11-05 14:11:41 +01:00
|
|
|
|
2021-11-05 14:34:15 +01:00
|
|
|
listPosts = defun [ (list blog.post) string ] (posts:
|
|
|
|
lib.concatStringsSep "\n" (map (p: "* [${p.title}](blog/${p.key})") posts)
|
|
|
|
);
|
2021-11-05 14:11:41 +01:00
|
|
|
|
|
|
|
postRenderingCommands = defun [ (list blog.post) string ] (posts:
|
|
|
|
lib.concatStringsSep "\n"
|
2021-11-05 14:19:06 +01:00
|
|
|
(map (p: "cp ${blog.renderPost tvl.blog.config p} $out/blog/${p.key}.html") posts)
|
2021-11-05 14:11:41 +01:00
|
|
|
);
|
2020-04-21 04:38:30 +02:00
|
|
|
|
2022-09-26 19:33:05 +02:00
|
|
|
tvlGraph = runCommand "tvl.svg"
|
2022-01-30 17:06:58 +01:00
|
|
|
{
|
|
|
|
nativeBuildInputs = with pkgs; [ fontconfig freetype cairo jetbrains-mono ];
|
|
|
|
} ''
|
2020-04-21 05:03:33 +02:00
|
|
|
${graphviz}/bin/neato -Tsvg ${./tvl.dot} > $out
|
2020-04-21 04:38:30 +02:00
|
|
|
'';
|
2020-04-21 04:16:17 +02:00
|
|
|
|
2021-12-01 10:32:53 +01:00
|
|
|
publishedPosts = filter blog.includePost tvl.blog.posts;
|
|
|
|
|
2021-11-05 14:11:41 +01:00
|
|
|
feed = {
|
|
|
|
id = "https://tvl.fyi/";
|
|
|
|
title = "TVL blog";
|
|
|
|
subtitle = "Thoughts and news from The Virus Lounge";
|
|
|
|
authors = [ "tazjin" ]; # TODO(tazjin): Extract from post info
|
|
|
|
|
|
|
|
links = lib.singleton {
|
|
|
|
rel = "self";
|
|
|
|
href = "https://tvl.fyi/feed.atom";
|
|
|
|
};
|
|
|
|
|
2021-12-01 10:32:53 +01:00
|
|
|
entries = map (blog.toFeedEntry tvl.blog.config) publishedPosts;
|
2021-11-05 14:11:41 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
atomFeed = writeText "feed.atom" (atom-feed.renderFeed feed);
|
|
|
|
|
2021-11-05 14:19:06 +01:00
|
|
|
homepage = tvl.template {
|
2021-05-12 16:00:39 +02:00
|
|
|
title = "The Virus Lounge";
|
|
|
|
content = ''
|
2021-09-22 14:19:43 +02:00
|
|
|
The Virus Lounge
|
|
|
|
================
|
|
|
|
|
2021-09-24 16:15:57 +02:00
|
|
|
----------------
|
2021-09-22 14:19:43 +02:00
|
|
|
|
2021-10-01 18:57:43 +02:00
|
|
|
<img class="tvl-logo" src="https://static.tvl.fyi/${depot.web.static.drvHash}/logo-animated.svg"
|
2021-09-24 16:15:57 +02:00
|
|
|
alt="Virus with lambda-shaped spike proteins sitting on an armchair">
|
2020-04-21 04:16:17 +02:00
|
|
|
|
2021-09-26 12:50:45 +02:00
|
|
|
Welcome to **The Virus Lounge**. We're a group of people who got
|
|
|
|
together in 2020, when we felt that there was not enough
|
|
|
|
spontaneous socialising on the internet.
|
|
|
|
|
|
|
|
Because of our shared interests in topics like **build systems**
|
|
|
|
and **monorepos** we started working on code together, in our
|
|
|
|
monorepo called the *depot*.
|
|
|
|
|
|
|
|
Feel free to explore the tech we have built so far, all our
|
|
|
|
systems are linked in the footer.
|
|
|
|
|
|
|
|
We mostly hang out on IRC. You can find us in [`#tvl`][tvl-irc]
|
|
|
|
on [hackint][], which is also reachable [via XMPP][hackint-xmpp]
|
2022-01-12 09:25:44 +01:00
|
|
|
at [`#tvl@irc.hackint.org`][tvl-xmpp] (sic!) and [via
|
|
|
|
Matrix][hackint-matrix] at [`#tvl:hackint.org`][tvl-matrix].
|
2021-09-26 12:50:45 +02:00
|
|
|
|
|
|
|
Hackint also provide a [web chat][tvl-webchat].
|
|
|
|
|
|
|
|
[tvl-irc]: ircs://irc.hackint.org:6697/#tvl
|
|
|
|
[hackint]: https://hackint.org/
|
|
|
|
[hackint-xmpp]: https://hackint.org/transport/xmpp
|
|
|
|
[tvl-xmpp]: xmpp:#tvl@irc.hackint.org?join
|
2022-01-12 09:25:44 +01:00
|
|
|
[hackint-matrix]: https://hackint.org/transport/matrix
|
|
|
|
[tvl-matrix]: https://matrix.to/#/#tvl:hackint.org
|
2021-09-26 12:50:45 +02:00
|
|
|
[tvl-webchat]: https://webirc.hackint.org/#ircs://irc.hackint.org/#tvl
|
2020-04-21 04:26:04 +02:00
|
|
|
|
2021-11-05 14:34:15 +01:00
|
|
|
----------------
|
|
|
|
|
|
|
|
## Blog
|
|
|
|
|
|
|
|
Here are the most recent TVL blog posts.
|
|
|
|
|
|
|
|
${listPosts publishedPosts}
|
|
|
|
|
|
|
|
You can also follow our [atom feed](https://tvl.fyi/feed.atom).
|
|
|
|
|
|
|
|
----------------
|
2020-04-21 04:38:30 +02:00
|
|
|
|
2021-05-12 16:57:07 +02:00
|
|
|
## Where did all these people come from?
|
|
|
|
|
|
|
|
It's pretty straightforward. Feel free to click on people, too.
|
|
|
|
|
|
|
|
<div class="tvl-graph-container">
|
|
|
|
<!--
|
|
|
|
cheddar leaves HTML inside of HTML alone,
|
|
|
|
so wrapping the SVG prevents it from messing it up
|
|
|
|
-->
|
|
|
|
${builtins.readFile tvlGraph}
|
|
|
|
</div>
|
2021-05-12 16:00:39 +02:00
|
|
|
'';
|
|
|
|
extraHead = ''
|
|
|
|
<style>
|
2021-05-12 16:57:07 +02:00
|
|
|
.tvl-graph-container {
|
|
|
|
max-width: inherit;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tvl-graph-container svg {
|
2021-05-12 16:00:39 +02:00
|
|
|
max-width: inherit;
|
|
|
|
height: auto;
|
|
|
|
}
|
2021-09-24 16:15:57 +02:00
|
|
|
|
|
|
|
.tvl-logo {
|
|
|
|
width: 60%;
|
|
|
|
display: block;
|
|
|
|
margin-left: auto;
|
|
|
|
margin-right: auto;
|
|
|
|
}
|
2021-05-12 16:00:39 +02:00
|
|
|
</style>
|
|
|
|
'';
|
|
|
|
};
|
2022-01-30 17:06:58 +01:00
|
|
|
in
|
2022-09-26 19:33:05 +02:00
|
|
|
runCommand "website" { } ''
|
2021-11-05 14:11:41 +01:00
|
|
|
mkdir -p $out/blog
|
2020-04-21 04:16:17 +02:00
|
|
|
cp ${homepage} $out/index.html
|
2021-11-05 14:19:06 +01:00
|
|
|
${postRenderingCommands tvl.blog.posts}
|
2021-11-05 14:11:41 +01:00
|
|
|
cp ${atomFeed} $out/feed.atom
|
2020-04-21 04:16:17 +02:00
|
|
|
''
|